当前位置:   article > 正文

UI设计

ui设计

1.背景   background:color ,image(position、repeat、size、attachment、all-range),

background:#fff url('    ') [ top  left]   [repeat: no-repeat、cover、]   [attachment:fixed]

2.透明度   opacity:0.8

  filter:alpha(opcity=80)

3. input框缩进   padding-left:

  text-indent:

4.    outline:none;   小蓝框

  input:focus{ box-shadow:0 0 3px #000 inset;}

5.  伪类  :hover{    }

   a:hover   .bt1:hover

6.鼠标样式  cursor:pointer

7.html   css  结构层次合理  同一功能尽量使用统一样式  

8.min-width  min-height 

9.绝对定位  相对定位

10.流式页面

效果图:

代码如下:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="../新项目/js/usual.js"></script>
  5. <meta charset="UTF-8">
  6. <title>UI图</title>
  7. <style>
  8. html,body{
  9. width:100%;
  10. height:100%
  11. }
  12. body{
  13. margin:0;
  14. padding:0;
  15. background-size: 100%;
  16. }
  17. .container{
  18. position:relative;
  19. width:100%;
  20. height:100%;
  21. background:#4589ae;
  22. background-image:url(../images/1019.jpg);
  23. background-repeat:no-repeat;
  24. background-size:cover;
  25. }
  26. .tu{
  27. width:30%;
  28. height:60%;
  29. text-align:center;
  30. position:absolute;
  31. opacity:0.9;
  32. filter:alpha(opacity=90);
  33. min-width:300px;
  34. min-height:400px;
  35. }
  36. .title{
  37. width:100%;
  38. height:15%;
  39. font-size:100%;
  40. font-weight:900;
  41. color:white;
  42. background-color:#4589ae;
  43. }
  44. .cont{
  45. width:100%;
  46. height:82%;
  47. font-size:100%;
  48. color:#649cf1;
  49. font-weight:900;
  50. background-color:white;
  51. }
  52. .cont input{
  53. text-indent:2%;
  54. margin:2% 0;
  55. width:80%;
  56. height:8%;
  57. outline:none;
  58. min-width:30px;
  59. min-height:14px;
  60. border:1px solid #649cf1;
  61. }
  62. .cont input:focus{
  63. box-shadow:0 0 3px 2px #649cf1 inset;
  64. }
  65. .cont button{
  66. height:8%;
  67. width:80%;
  68. background-color:#649cf1;
  69. border:none;
  70. outline:none;
  71. }
  72. .cont button:hover{
  73. cursor:pointer;
  74. }
  75. .bt_span{
  76. color:white;
  77. }
  78. </style>
  79. </head>
  80. <body>
  81. <div class="container">
  82. <div class="tu">
  83. <div class="title">
  84. <div style="width:100%;height:30%;"></div>
  85. <span>Please Enter Your New Password</span>
  86. </div>
  87. <div class="cont">
  88. <div style="width:100%;height:5%;"></div>
  89. <span>Your Account</span>
  90. <input />
  91. <div style="width:100%;height:13%;"></div>
  92. <span>New Password</span>
  93. <input />
  94. <div style="width:100%;height:5%;"></div>
  95. <span>Confirm Your New Password</span>
  96. <input />
  97. <div style="width:100%;height:5%;"></div>
  98. <button><span class="bt_span">Finish</span></button>
  99. </div>
  100. </div>
  101. </div>
  102. <script>
  103. $(document).ready(function(){
  104. var scwidth=$(window).width();
  105. var scheight=$(window).height();
  106. var scwidth1=$('.tu').width();
  107. var scheight1=$('.tu').height();
  108. var endwidth=(scwidth-scwidth1)/2;
  109. var endheight=(scheight-scheight1)/2;
  110. $('.tu').css({
  111. 'top':endheight+'px',
  112. 'left':endwidth+'px'
  113. });
  114. });
  115. $(window).resize(function(){
  116. var scwidth=$(window).width();
  117. var scheight=$(window).height();
  118. var scwidth1=$('.tu').width();
  119. var scheight1=$('.tu').height();
  120. var endwidth=(scwidth-scwidth1)/2;
  121. var endheight=(scheight-scheight1)/2;
  122. $('.tu').css({
  123. 'top':endheight+'px',
  124. 'left':endwidth+'px',
  125. });
  126. });
  127. </script>
  128. </body>
  129. </html>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/895146
推荐阅读
相关标签
  

闽ICP备14008679号