• 用vscode仿制小米官网


    html内容:

     

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <title>Documenttitle>
    7. <link rel="stylesheet" href="./08-index.css">
    8. <link rel="stylesheet" href="../作业/download/font_4488556_kzk9knke5t/iconfont.css">
    9. head>
    10. <body>
    11. <div class="header">
    12. <div class="content">
    13. <div class="header-left">
    14. <a href="#">小米官网a>
    15. <span class="sep">|span>
    16. <a href="#">小米商城a>
    17. <span class="sep">|span>
    18. <a href="#">小米澎湃OSa>
    19. <span class="sep">|span>
    20. <a href="#">loTa>
    21. <span class="sep">|span>
    22. <a href="#">云服务a>
    23. <span class="sep">|span>
    24. <a href="#">天星数科a>
    25. <span class="sep">|span>
    26. <a href="#">有品a>
    27. <span class="sep">|span>
    28. <a href="#">小爱开放平台a>
    29. <span class="sep">|span>
    30. <a href="#">资质证照a>
    31. <span class="sep">|span>
    32. <a href="#">协议规则a>
    33. <span class="sep">|span>
    34. <a href="#">下载appa>
    35. <span class="sep">|span>
    36. <a href="#">Select Locationa>
    37. div>
    38. <div class="header-right">
    39. <a href="#"class="sep">登录a>
    40. <span class="sep">|span>
    41. <a href="#"class="sep">注册a>
    42. <span class="sep">|span>
    43. <a href="#"class="sep">信息通知a>
    44. <span class="sep">|span>
    45. <span class="iconfont icon-gouwuchekong">span>
    46. <a href="#"class="shopping">购物车a>
    47. div>
    48. div>
    49. div>
    50. <div class="top-nav">
    51. <div class="content">
    52. <div class="top-nav-left">
    53. div>
    54. <div class="top-nav-mid">
    55. <ul>
    56. <li><a href="#">Xiaomi手机a>li>
    57. <li><a href="#">Redmi手机a>li>
    58. <li><a href="#">电视a>li>
    59. <li><a href="#">笔记本a>li>
    60. <li><a href="#">平板a>li>
    61. <li><a href="#">家电a>li>
    62. <li><a href="#">路由器a>li>
    63. <li><a href="#">服务中心a>li>
    64. <li><a href="#">社区a>li>
    65. ul>
    66. div>
    67. <div class="top-nav-right">
    68. <form action="#">
    69. <input type="text">
    70. <span class="iconfont icon-sousuo">span>
    71. form>
    72. div>
    73. div>
    74. div>
    75. <div class="top-mid">
    76. <div class="content">
    77. <div class="top-mid-left">
    78. <ul>
    79. <li><a href="#"class="title">手机 >a>li>
    80. <li><a href="#"class="title">电视 >a>li>
    81. <li><a href="#"class="title">家电 >a>li>
    82. <li><a href="#"class="title">笔记本平板 >a>li>
    83. <li><a href="#"class="title">出行 穿戴 >a>li>
    84. <li><a href="#"class="title">耳机 音箱 >a>li>
    85. <li><a href="#"class="title">健康 儿童 >a>li>
    86. <li><a href="#"class="title">生活 箱包 >a>li>
    87. <li><a href="#"class="title">智能路由器 >a>li>
    88. <li><a href="#"class="title">电源配件 >a>li>
    89. ul>
    90. div>
    91. <div class="top-mid-right" style="transition-duration: 1s ;">
    92. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    93. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    94. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    95. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    96. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    97. <div class="top-mid-right-yuan" style="transition-duration: 800ms ;">div>
    98. div>
    99. div>
    100. div>
    101. <div class="top-bottom">
    102. <div class="content">
    103. <ul class="top-bottom-left">
    104. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/82abdba456e8caaea5848a0cddce03db.png?w=48&h=48"width="24px"height="24px">保障服务a>li>
    105. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/806f2dfb2d27978e33fe3815d3851fa3.png?w=48&h=48"width="24px"height="24px">企业团购a>li>
    106. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/eded6fa3b897a058163e2485532c4f10.png?w=48&h=48"width="24px"height="24px">F码通道a>li>
    107. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/43a3195efa6a3cc7662efed8e7abe8bf.png?w=48&h=48"width="24px"height="24px">米粉卡a>li>
    108. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/f4846bca6010a0deb9f85464409862af.png?w=48&h=48"width="24px"height="24px">以旧换新a>li>
    109. <li><a href="#"class="other"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/9a76d7636b08e0988efb4fc384ae497b.png?w=48&h=48"width="24px"height="24px">话费充值a>li>
    110. ul>
    111. <div class="top-bottom-right1">div>
    112. <div class="top-bottom-right2">div>
    113. <div class="top-bottom-right3">div>
    114. div>
    115. div>
    116. div>
    117. body>
    118. html>

     css内容:

    1. *{
    2. margin: 0;
    3. padding: 0;
    4. box-sizing: border-box;
    5. }
    6. li{
    7. list-style: none;
    8. }
    9. a{
    10. text-decoration: none;
    11. }
    12. .content{
    13. width: 1226;
    14. margin: 0 auto;
    15. }
    16. /* header开始 */
    17. .header{
    18. height: 40px;
    19. background-color: #333;
    20. color: #b0b0b0;
    21. font-size: 12px;
    22. overflow: hidden;
    23. }
    24. .header-left{
    25. width: 769px;
    26. height: 40px;
    27. }
    28. .header-right{
    29. width: 200px;
    30. height: 40px;
    31. }
    32. .header .content{
    33. display: flex;
    34. justify-content:space-evenly
    35. }
    36. .header .content a{
    37. font-size: 12px;
    38. color: #b0b0b0;
    39. line-height: 40px;
    40. }
    41. .header-left .sep{
    42. margin: 0 ;
    43. }
    44. .header .shopping{
    45. margin-left: 0px;
    46. }
    47. /* header结束 */
    48. /* top-nav开始 */
    49. .top-nav{
    50. height: 100px;
    51. overflow: hidden;
    52. }
    53. .top-nav .content {
    54. display: flex;
    55. justify-content: space-evenly;
    56. }
    57. .top-nav-left{
    58. background: url("https://cdn.cnbj1.fds.api.mi-img.com/mi.com-assets/shop/img/logo-mi2.png") no-repeat;
    59. width: 56px;
    60. height: 56px;
    61. background-size: 56px;
    62. margin-top: 20px;
    63. }
    64. .top-nav-mid ul{
    65. display: flex;
    66. justify-content: space-between;
    67. width: 700px;
    68. height: 100px;
    69. line-height: 100px;
    70. }
    71. .top-nav-mid ul a{
    72. color: #333;
    73. }
    74. .top-nav-mid ul a:hover{
    75. color: chocolate;
    76. }
    77. .top-nav-right {
    78. padding-top: 25px;
    79. width: 296px;
    80. height: 100px;
    81. line-height: 100px;
    82. }
    83. .top-nav-right form {
    84. position: relative;
    85. width: 296px;
    86. height: 50px;
    87. }
    88. .top-nav-right input{
    89. position: absolute;
    90. left: 0;
    91. top: 0;
    92. width: 245px;
    93. height: 50px;
    94. vertical-align: middle;
    95. outline: none;
    96. }
    97. .top-nav-right span{
    98. display: inline-block;
    99. position: absolute;
    100. right: 0;
    101. top: 0;
    102. width: 52px;
    103. height: 50px;
    104. line-height: 50px;
    105. border: 1px solid black;
    106. text-align: center;
    107. font-size: 24px;
    108. }
    109. /* top-nav 结束*/
    110. .a{
    111. height: 100px;
    112. }
    113. /* top-mid */
    114. .top-mid{
    115. width: 1226px;
    116. height: 420px;
    117. margin: 0 auto;
    118. }
    119. .top-mid .content {
    120. display: flex;
    121. justify-content: space-evenly;
    122. }
    123. .top-mid-left{
    124. background-color: #B0B0B0;
    125. width: 234px;
    126. height: 420px;
    127. position: relative;
    128. }
    129. .top-mid .title{
    130. width: 234px;
    131. height: 42px;
    132. text-decoration:none;
    133. color: aliceblue;
    134. padding: 0px 0px 0px 30px;
    135. display: flex;
    136. flex-direction: column;
    137. }
    138. .top-mid-left ul a {
    139. color: #f0f8ff;
    140. }
    141. .top-mid-right{
    142. width: 992px;
    143. height: 420px;
    144. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/079f2eab16fdcb6132f7f58ffcf24b0a.jpg?thumb=1&w=1839&h=690&f=webp&q=90);
    145. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/6ddaa05fc2385ded9081a56dfb20ae0d.jpg?thumb=1&w=1839&h=690&f=webp&q=90);
    146. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/aad6b7322cba5a5c13ee316610711fdc.jpg?thumb=1&w=1839&h=690&f=webp&q=90);
    147. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/802443805243d8505730c204a391bf0a.jpg?thumb=1&w=1839&h=690&f=webp&q=90);
    148. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/daa8668ce81bc05a5b8a6ef05072047d.jpg?w=2452&h=920);
    149. background-size: cover;
    150. }
    151. .top-mid-right-yuan{
    152. width: 10px;
    153. height: 10px;
    154. border-radius: 100px;
    155. display: inline-block;
    156. position: relative;
    157. left: 900px;
    158. top: 400px;
    159. background-color: #B0B0B0;
    160. }
    161. /* top-bottom */
    162. .top-bottom{
    163. width: 1240px;
    164. height: 170px;
    165. margin: 0 auto;
    166. }
    167. .top-bottom .content {
    168. display: flex;
    169. justify-content: space-evenly;
    170. }
    171. .top-bottom-left{
    172. display: inline-block;
    173. background-color: #5f5750;
    174. width: 234px;
    175. height: 170px;
    176. font-display: flex;
    177. flex-wrap: wrap;
    178. justify-content: space-between;
    179. align-content: space-evenly;
    180. }
    181. /* .top-bottom ul{
    182. width: 76px;
    183. height: 82px;
    184. padding: 0 3px;
    185. display: flex;
    186. flex-wrap: wrap;
    187. justify-content: space-between;
    188. align-content: space-evenly;
    189. } */
    190. .top-bottom .other{
    191. width: 70px;
    192. height: 64px;
    193. color: aliceblue;
    194. padding: 18px 0px 0px ;
    195. list-style: none;
    196. }
    197. .top-bottom-right1{
    198. width: 316px;
    199. height: 170px;
    200. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/6b67117bc92924fb2ff0e7ad2be86084.png?w=632&h=340);
    201. background-size: cover;
    202. }
    203. .top-bottom-right2{
    204. width: 316px;
    205. height: 170px;
    206. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/8dede2520f8dfff9c9b690af498cafe8.jpg?w=632&h=340);
    207. background-size: cover;
    208. }
    209. .top-bottom-right3{
    210. width: 316px;
    211. height: 170px;
    212. background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/1ac77590368ff636d0b4f6a988133f55.png?w=632&h=340);
    213. background-size: cover;
    214. }

     结果呈现:

  • 相关阅读:
    学生党用什么蓝牙耳机好?学生党性价比高的蓝牙耳机推荐
    TTS引用与选型
    一条 sql 语句可能导致的表锁和行锁以及死锁检测
    类中静态代码块、实例代码块、构造方法执行次序
    【数据库】03——初级开发需要掌握哪些SQL语句
    coredns无法启动
    温度响应性纳米水凝胶光子品体/纤维素修饰荧光水凝胶/载脂质体水凝胶的制备方法
    Pandas读取json文件
    rust变量
    西湖大学利用 Transformer 分析百亿多肽的自组装特性,破解自组装法则
  • 原文地址:https://blog.csdn.net/simply_happy/article/details/137197546