博客列表 >苏宁首页仿写,及grid布局相关属性预习

苏宁首页仿写,及grid布局相关属性预习

Ghcᝰ
Ghcᝰ原创
2021年03月29日 00:12:07573浏览

苏宁首页仿写

仿苏宁

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>苏宁易购</title>
  8. <link rel="stylesheet" href="static/css/indexsn.css">
  9. <link rel="stylesheet" href="static/icon-font/iconfont.css">
  10. <link rel="stylesheet" href="static/css/headersn.css">
  11. <link rel="stylesheet" href="static/css/footersn.css">
  12. <link rel="stylesheet" href="static/css/mainsn.css">
  13. </head>
  14. <body>
  15. <div class="header">
  16. <div class="fenlei">
  17. <div class="iconfont icon-layers"></div>
  18. <span>分类</span>
  19. </div>
  20. <div class="search">
  21. <div class="zoom iconfont icon-search"></div>
  22. <input type="text" class="words" value="踏青好物低至8.8元">
  23. </div>
  24. <a href="" class="login">
  25. <div class="fenlei">
  26. <div class="iconfont icon-user"></div>
  27. <span>登录</span>
  28. </div>
  29. </a>
  30. </div>
  31. <div class="main">
  32. <!-- 主导航区 -->
  33. <ul class="nav">
  34. <li>
  35. <a href="#"><img src="static/images/nav/nav-1.png" alt=""></a>
  36. <a href="">苏宁秒杀</a>
  37. </li>
  38. <li>
  39. <a href="#"><img src="static/images/nav/nav-2.png" alt=""></a>
  40. <a href="">苏宁超市</a>
  41. </li>
  42. <li>
  43. <a href="#"><img src="static/images/nav/nav-3.png" alt=""></a>
  44. <a href="">苏宁拼购</a>
  45. </li>
  46. <li>
  47. <a href="#"><img src="static/images/nav/nav-4.png" alt=""></a>
  48. <a href="">手机数码</a>
  49. </li>
  50. <li>
  51. <a href="#"><img src="static/images/nav/nav-5.png" alt=""></a>
  52. <a href="">苏宁家电</a>
  53. </li>
  54. <li>
  55. <a href="#"><img src="static/images/nav/nav-6.png" alt=""></a>
  56. <a href="">免费水果</a>
  57. </li>
  58. <li>
  59. <a href="#"><img src="static/images/nav/nav-7.png" alt=""></a>
  60. <a href="">super会员</a>
  61. </li>
  62. <li>
  63. <a href="#"><img src="static/images/nav/nav-8.png" alt=""></a>
  64. <a href="">签到有礼</a>
  65. </li>
  66. <li>
  67. <a href="#"><img src="static/images/nav/nav-9.png" alt=""></a>
  68. <a href="">领券中心</a>
  69. </li>
  70. <li>
  71. <a href="#"><img src="static/images/nav/nav-10.png" alt=""></a>
  72. <a href="">更多频道</a>
  73. </li>
  74. </ul>
  75. <!-- 内容主图区 -->
  76. <ul class="tj">
  77. <li class="item">
  78. <a href=""><img src="static/images/zt/sp-1.jpg" alt=""></a>
  79. <p>商品介绍</p>
  80. <div class="price">
  81. <div class="iconfont icon-rmb">
  82. 168
  83. </div>
  84. <span>XXX+评价</span>
  85. </div>
  86. </li>
  87. <li class="item">
  88. <a href=""><img src="static/images/zt/sp-2.png" alt=""></a>
  89. <p>商品介绍</p>
  90. <div class="price">
  91. <div class="iconfont icon-rmb">
  92. 168
  93. </div>
  94. <span>XXX+评价</span>
  95. </div>
  96. </li>
  97. <li class="item">
  98. <a href=""><img src="static/images/zt/sp-3.png" alt=""></a>
  99. <p>商品介绍</p>
  100. <div class="price">
  101. <div class="iconfont icon-rmb">
  102. 168
  103. </div>
  104. <span>XXX+评价</span>
  105. </div>
  106. </li>
  107. <li class="item">
  108. <a href=""><img src="static/images/zt/sp-4.jpg" alt=""></a>
  109. <p>商品介绍</p>
  110. <div class="price">
  111. <div class="iconfont icon-rmb">
  112. 168
  113. </div>
  114. <span>XXX+评价</span>
  115. </div>
  116. </li>
  117. <li class="item">
  118. <a href=""><img src="static/images/zt/sp-5.jpg" alt=""></a>
  119. <p>商品介绍</p>
  120. <div class="price">
  121. <div class="iconfont icon-rmb">
  122. 168
  123. </div>
  124. <span>XXX+评价</span>
  125. </div>
  126. </li>
  127. <li class="item">
  128. <a href=""><img src="static/images/zt/sp-6.jpg" alt=""></a>
  129. <p>商品介绍</p>
  130. <div class="price">
  131. <div class="iconfont icon-rmb">
  132. 168
  133. </div>
  134. <span>XXX+评价</span>
  135. </div>
  136. </li>
  137. <li class="item">
  138. <a href=""><img src="static/images/zt/sp-7.png" alt=""></a>
  139. <p>商品介绍</p>
  140. <div class="price">
  141. <div class="iconfont icon-rmb">
  142. 168
  143. </div>
  144. <span>XXX+评价</span>
  145. </div>
  146. </li>
  147. <li class="item">
  148. <a href=""><img src="static/images/zt/sp-8.jpg" alt=""></a>
  149. <p>商品介绍</p>
  150. <div class="price">
  151. <div class="iconfont icon-rmb">
  152. 168
  153. </div>
  154. <span>XXX+评价</span>
  155. </div>
  156. </li>
  157. <li class="item">
  158. <a href=""><img src="static/images/zt/sp-9.jpg" alt=""></a>
  159. <p>商品介绍</p>
  160. <div class="price">
  161. <div class="iconfont icon-rmb">
  162. 168
  163. </div>
  164. <span>XXX+评价</span>
  165. </div>
  166. </li>
  167. <li class="item">
  168. <a href=""><img src="static/images/zt/sp-10.jpg" alt=""></a>
  169. <p>商品介绍</p>
  170. <div class="price">
  171. <div class="iconfont icon-rmb">
  172. 168
  173. </div>
  174. <span>XXX+评价</span>
  175. </div>
  176. </li>
  177. </ul>
  178. </div>
  179. <div class="footer1">
  180. <div class="mengban">要是你不登陆,我就赖这不走了!</div>
  181. <div class="denglu">立即登录</div>
  182. </div>
  183. <div class="footer">
  184. <div>
  185. <div class="iconfont icon-home"></div>
  186. <span>首页</span>
  187. </div>
  188. <div>
  189. <div class="iconfont icon-search"></div>
  190. <span>分类</span>
  191. </div>
  192. <div>
  193. <div class="iconfont icon-xiangmu"></div>
  194. <span>排行榜</span>
  195. </div>
  196. <div>
  197. <div class="iconfont icon-shopping-cart
  198. "></div>
  199. <span>购物车</span>
  200. </div>
  201. <div>
  202. <div class="iconfont icon-user"></div>
  203. <span>我的易购</span>
  204. </div>
  205. </div>
  206. </body>
  207. </html>

grid布局十大常用属性

序号 属性 描述
1 grid-template-columns 定义网格轨道中的列宽
2 grid-template-rows 定义网格轨道中的行高
3 gap 网格轨道间距
4 grid-auto-flow 项目在容器中的排列方向
5 grid-auto-rows 隐式网格单元的行高
6 grid-auto-columns 隐式网格单元的列宽
7 grid-area 定义网格区域
8 place-items 所有项目在网络单元中的对齐方式
9 place-self 某个项目在网络单元(含网格区域)中的对齐方式
10 place-content 项目在网格容器中的对齐方式
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议