• 一个简单的注册页面,如有错误请指正(2.css)


    这段CSS代码定义了页面的样式,让我逐个解释其功能:

    1. `* {}`:通配符选择器,用于将页面中的所有元素设置统一的样式。这里将margins和paddings设置为0,以去除默认的边距。

    2. `div img {}`:选择页面中所有div元素内的img元素,并设定其样式。这里设置img元素的宽度为视窗宽度的100%(即铺满整个屏幕宽度),高度为15视口高度。

    3. `.head`:定义一个类选择器,用于对位于页头的元素进行样式设置。

    4. `.head-left`和`.head-right`:这两个类选择器分别用于对页头左侧和右侧的元素进行样式设置。设置了宽度、高度、字体大小、颜色、显示方式、背景颜色和底部边框等样式。

    5. `.acc`和`.acc div`:这两个选择器分别用于对显示账号的元素进行样式设置。

    6. `.name`和`.name input`:用于对显示姓名的元素进行样式设置。

    7. `.add`和`.add div`:用于对显示地址的元素进行样式设置。

    8. `.code`和`.code input`:用于对显示邮编的元素进行样式设置。

    9. `.names`和`.names div`:用于对显示名字的元素进行样式设置。

    10. `.gender span`和`.gender input`:用于对显示性别的元素进行样式设置。

    11. `.gan-left`和`.print`:用于对显示性格和印象的元素进行样式设置。

    12. `#imgs`:对ID为`imgs`的元素进行样式设置。

    13. `.footer`和`.footer-f div`:用于对页脚的元素进行样式设置。

    14. `#alert`:对ID为`alert`的元素进行样式设置,包括宽度、高度、背景色、显示和定位等。

    15. `.popup-container`、`.popup-container h2`、`.popup-container p`和`.popup-container button`:用于对弹出框的元素进行样式设置,包括定位、背景色、边框、内边距、字体颜色等。

    这段代码定义了页面的布局和各种元素的样式,通过对不同的元素应用不同的类选择器或ID选择器,实现了个性化的样式设置。

    1. * {
    2. margin: 0;
    3. padding: 0;
    4. }
    5. div img {
    6. width: 100vw;
    7. height: 15vh;
    8. }
    9. .head {
    10. width: 100%;
    11. display: flex;
    12. }
    13. .head-left {
    14. width: 50%;
    15. height: 40px;
    16. font-size: 12px;
    17. color: rgb(162, 162, 162);
    18. display: flex;
    19. background-color: #ebebeb;
    20. justify-content: center;
    21. align-items: center;
    22. border-bottom: 1px solid rgb(235, 235, 235);
    23. }
    24. .head-left div {
    25. /* margin-top: 8%; */
    26. }
    27. .head-right {
    28. width: 50%;
    29. height: 40px;
    30. font-size: 12px;
    31. color: rgb(162, 162, 162);
    32. display: flex;
    33. justify-content: center;
    34. align-items: center;
    35. border-bottom: 1px solid rgb(235, 235, 235);
    36. }
    37. .head-right div {
    38. font-size: 15px;
    39. justify-content: center;
    40. /* margin-top: 4%; */
    41. }
    42. .acc {
    43. width: 100%;
    44. margin-top: 10%;
    45. }
    46. .acc div {
    47. width: 50%;
    48. font-size: 15px;
    49. text-align: center;
    50. }
    51. .name {
    52. width: 80%;
    53. margin-left: 5%;
    54. }
    55. .name input {
    56. width: 100%;
    57. margin-top: 10%;
    58. border: none;
    59. margin-left: 10%;
    60. border-bottom: 1px solid #b1b1b1;
    61. outline: none;
    62. }
    63. .add {
    64. width: 100%;
    65. margin-top: 10%;
    66. }
    67. .add div {
    68. width: 50%;
    69. font-size: 15px;
    70. text-align: center;
    71. }
    72. .code {
    73. width: 80%;
    74. margin-left: 5%;
    75. }
    76. .code input {
    77. width: 100%;
    78. margin-top: 10%;
    79. border: none;
    80. margin-left: 10%;
    81. border-bottom: 1px solid #b1b1b1;
    82. outline: none;
    83. }
    84. .names {
    85. width: 100%;
    86. }
    87. .names div {
    88. width: 50%;
    89. margin-top: 10%;
    90. font-size: 15px;
    91. text-align: center;
    92. }
    93. .names input {
    94. width: 80%;
    95. margin-top: 10%;
    96. border: none;
    97. margin-left: 13%;
    98. border-bottom: 1px solid #b1b1b1;
    99. outline: none;
    100. }
    101. .gender {
    102. width: 100%;
    103. margin-top: 10%;
    104. display: flex;
    105. }
    106. .gender span {
    107. font-size: 15px;
    108. }
    109. .gender input {
    110. width: 15px;
    111. margin-left: 2%;
    112. border-radius: 100%;
    113. font-size: 10vh;
    114. }
    115. .gan-left {
    116. width: 30%;
    117. margin-left: 10%;
    118. font-size: 15px;
    119. }
    120. .print {
    121. display: flex;
    122. align-items: flex-end;
    123. width: 60%;
    124. margin-top: 10%;
    125. font-size: 15px;
    126. margin-left: 10%;
    127. }
    128. #imgs {
    129. width: 15vw;
    130. height: 10vh;
    131. border-radius: 50%;
    132. display: flex;
    133. align-items: center;
    134. }
    135. .footer {
    136. width: 85%;
    137. height: 50px;
    138. position: relative;
    139. margin-top: 1%;
    140. margin-left: 10%;
    141. justify-content: center;
    142. background-color: #66b1ff;
    143. }
    144. .footer-f {
    145. width: 100%;
    146. position: absolute;
    147. }
    148. .footer-f div {
    149. color: #fff;
    150. font-size: 15px;
    151. margin-top: 5%;
    152. text-align: center;
    153. justify-content: center;
    154. }
    155. #alert {
    156. width: 80%;
    157. height: 50px;
    158. margin-left: 8%;
    159. background-color: #66b1ff;
    160. display: none;
    161. text-align: center;
    162. padding: 10px;
    163. text-align: center;
    164. position: fixed;
    165. top: 100px;
    166. }
    167. .popup-container {
    168. position: fixed;
    169. top: 50%;
    170. left: 50%;
    171. transform: translate(-50%, -50%);
    172. background-color: #fff;
    173. border: 1px solid #ccc;
    174. padding: 20px;
    175. z-index: 9999;
    176. }
    177. .popup-container h2 {
    178. margin: 0;
    179. color: #333;
    180. }
    181. .popup-container p {
    182. margin: 10px 0;
    183. color: #555;
    184. }
    185. .popup-container button {
    186. padding: 5px 10px;
    187. background-color: #66b1ff;
    188. color: #fff;
    189. border: none;
    190. cursor: pointer;
    191. }

     

  • 相关阅读:
    Python反复折磨斐波那契序列
    2022年 安全智能 分析的挑战 模型交付 学习笔记
    信创大趋势下,金融行业如何实现数据交换国产化
    【数据结构】ArrayList详解
    8.稳定性专题
    为什么我的Windows 10笔记本电脑明明什么软件都没开,风扇却一直在转?
    计算机网络 实验五 RIP与OSPF实验(网络层算法)
    [DeepLearning] 线性回归的实现Pytorch
    Jmeter压力测试工具,下载、安装、汉化超详细教程
    计算机网络-物理层
  • 原文地址:https://blog.csdn.net/IKUNzhenin/article/details/134088073