Blogger Information
Blog 13
fans 0
comment 0
visits 6604
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
移动端商品列表
shooter
Original
470 people have browsed it

效果图

html代码

  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. <link rel="stylesheet" href="font_icon/iconfont.css" />
  8. <link rel="stylesheet" href="css/reset.css" />
  9. <link rel="stylesheet" href="css/header.css" />
  10. <link rel="stylesheet" href="css/footer.css" />
  11. <link rel="stylesheet" href="css/main.css" />
  12. <link rel="stylesheet" href="css/shoping.css" />
  13. <title>Document</title>
  14. </head>
  15. <body>
  16. <!-- 头部 -->
  17. <header>
  18. <!-- 顶部 -->
  19. <div class="top">
  20. <div class="logo iconfont icon-shejiaotubiao-08"></div>
  21. <!-- 搜索框 -->
  22. <div class="search">
  23. <div class="keys">
  24. <span class="iconfont icon-fangdajing"></span>
  25. <span>寻找店铺宝贝</span>
  26. </div>
  27. </div>
  28. </div>
  29. <!-- 轮播图 -->
  30. <div class="slider">
  31. <a href=""><img src="images/banner/banner1.jpg" alt="" /></a>
  32. </div>
  33. <!-- 导航 -->
  34. <ul class="nav">
  35. <li class="item">
  36. <a href=""><img src="images/nav/nav6.png" alt="" /></a>
  37. <a href="">天猫新品</a>
  38. </li>
  39. <li class="item">
  40. <a href=""><img src="images/nav/nav3.png" alt="" /></a>
  41. <a href="">今日爆款</a>
  42. </li>
  43. <li class="item">
  44. <a href=""><img src="images/nav/nav1.png" alt="" /></a>
  45. <a href="">天猫超市</a>
  46. </li>
  47. <li class="item">
  48. <a href=""><img src="images/nav/nav2.png" alt="" /></a>
  49. <a href="">充值中心</a>
  50. </li>
  51. <li class="item">
  52. <a href=""><img src="images/nav/nav5.png" alt="" /></a>
  53. <a href="">机票酒店</a>
  54. </li>
  55. <li class="item">
  56. <a href=""><img src="images/nav/nav8.png" alt="" /></a>
  57. <a href="">金币庄园</a>
  58. </li>
  59. <li class="item">
  60. <a href=""><img src="images/nav/nav7.png" alt="" /></a>
  61. <a href="">阿里拍卖</a>
  62. </li>
  63. <li class="item">
  64. <a href=""><img src="images/nav/nav4.png" alt="" /></a>
  65. <a href=""> 分类</a>
  66. </li>
  67. <li class="item">
  68. <a href=""><img src="images/nav/nav7.png" alt="" /></a>
  69. <a href="">阿里拍卖</a>
  70. </li>
  71. <li class="item">
  72. <a href=""><img src="images/nav/nav4.png" alt="" /></a>
  73. <a href=""> 分类</a>
  74. </li>
  75. </ul>
  76. </header>
  77. <!-- 主体 -->
  78. <
  79. <main style="height: 1600px">
  80. <!-- 1. 聚划算 -->
  81. <div class="top">
  82. <div class="item jhs">
  83. <div class="box">
  84. <h3 class="title">聚划算</h3>
  85. <div class="desc">
  86. <h4>品牌折扣</h4>
  87. <img src="images/items/item1.png" alt="" />
  88. </div>
  89. </div>
  90. <div class="box">
  91. <!-- 用实体空格表示占位符 -->
  92. <h3 class="title">&nbsp;</h3>
  93. <div class="desc">
  94. <h4>划算好货</h4>
  95. <img src="images/items/item2.png" alt="" />
  96. </div>
  97. </div>
  98. <div class="box">
  99. <h3 class="title">淘抢购</h3>
  100. <div class="desc">
  101. <h4>限时半价</h4>
  102. <img src="images/items/item3.png" alt="" />
  103. </div>
  104. </div>
  105. <div class="box">
  106. <h3 class="title">天天特价</h3>
  107. <div class="desc">
  108. <h4>9.9包邮</h4>
  109. <img src="images/items/item4.png" alt="" />
  110. </div>
  111. </div>
  112. </div>
  113. <div class="item right">
  114. <div class="box">
  115. <h3 class="title">
  116. 淘宝直播
  117. <span class="tag" style="background-color: red">LIVE</span>
  118. </h3>
  119. <div class="detail">
  120. <div class="left">
  121. <span class="title">好物传送门</span>
  122. <img src="images/items/item5.png" alt="" />
  123. </div>
  124. <div class="right">
  125. <img src="images/items/item6.png" alt="" />
  126. </div>
  127. </div>
  128. </div>
  129. <div class="box">
  130. <h3 class="title">
  131. 有好货&nbsp;<span class="tag" style="background-color: skyblue"
  132. >品质好物</span
  133. >
  134. </h3>
  135. <div class="detail">
  136. <div class="left">
  137. <span class="title" style="color: skyblue">全民口碑推荐</span>
  138. <img src="images/items/item7.png" alt="" />
  139. </div>
  140. <div class="right">
  141. <img src="images/items/item21.png" alt="" />
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="item right">
  147. <div class="box">
  148. <h3 class="title">
  149. 每日好店
  150. <span class="tag" style="background-color: orange">精选</span>
  151. </h3>
  152. <div class="detail">
  153. <div class="left">
  154. <span class="title">深挖藏的店</span>
  155. <img src="images/items/item9.png" alt="" />
  156. </div>
  157. <div class="right">
  158. <img src="images/items/item10.png" alt="" />
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <div class="item right">
  164. <div class="box">
  165. <h3 class="title">
  166. 哇哦视频<span class="tag" style="background-color: orange"
  167. >亲测</span
  168. >
  169. </h3>
  170. <div class="detail">
  171. <div class="left">
  172. <span class="title">粉丝都爱看</span>
  173. <img src="images/items/item11.png" alt="" />
  174. </div>
  175. <div class="right">
  176. <img src="images/items/item12.png" alt="" />
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <!-- 底部滚动显示文本 -->
  182. <div class="item footer">
  183. <div class="title">淘宝头条</div>
  184. <div class="content">
  185. <span class="type">评测</span>
  186. <span style="font-size: larger">6万人砍不下来一部手机</span>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="cnxh">
  191. <img src="images/cnxh/TB1V2eQrKSSBuNjy0FlXXbBpVXa-966-114.png" alt="" />
  192. </div>
  193. <!-- 2. 商品列表 -->
  194. <div class="list">
  195. <div class="shopping">
  196. <div class="shopping-a">
  197. <a href="#">
  198. <img src="images/sp/1.jpg" />
  199. <p>日本进口缝隙收纳厨房置物架冰箱夹缝可移动</p>
  200. <div class="bq">
  201. <span>¥12.9</span><span>2000+人已购买</span>
  202. </div>
  203. </a>
  204. </div>
  205. <div class="shopping-b">
  206. <a href="#">
  207. <img src="images/sp/2.jpg" />
  208. <p>韩国拉面锅网红金色煮面泡面锅泡面小食堂</p>
  209. <div class="bq">
  210. <span>¥12.9</span><span>2000+人已购买</span>
  211. </div>
  212. </a>
  213. </div>
  214. <div class="shopping-c">
  215. <a href="#">
  216. <img src="images/sp/2.jpg" />
  217. <p>韩国拉面锅网红金色煮面泡面锅泡面小食堂</p>
  218. <div class="bq">
  219. <span>¥12.9</span><span>2000+人已购买</span>
  220. </div>
  221. </a>
  222. </div>
  223. <div class="shopping-d">
  224. <a href="#">
  225. <img src="images/sp/1.jpg" />
  226. <p>日本进口缝隙收纳厨房置物架冰箱夹缝可移动</p>
  227. <div class="bq">
  228. <span>¥12.9</span><span>2000+人已购买</span>
  229. </div>
  230. </a>
  231. </div>
  232. </div>
  233. </div>
  234. </main>
  235. <!-- 底部 -->
  236. <footer>
  237. <div class="item active">
  238. <a href="" class="iconfont icon-shejiaotubiao-44"></a>
  239. </div>
  240. <div class="item">
  241. <a href="" class="iconfont icon-gouwuche"></a>
  242. <a href="">购物车</a>
  243. </div>
  244. <div class="item">
  245. <a href="" class="iconfont icon-wodetaobao"></a>
  246. <a href="">我的淘宝</a>
  247. </div>
  248. </footer>
  249. </body>
  250. </html>

css

  1. /* 商品 */
  2. main .cnxh {
  3. display: grid;
  4. place-content: center;
  5. width: 100%;
  6. height: 0.5rem;
  7. z-index: 99;
  8. }
  9. main .cnxh img {
  10. width: 1.7rem;
  11. height: 0.2rem;
  12. }
  13. .list {
  14. padding: 0.2rem 0;
  15. }
  16. .shopping {
  17. text-align: center;
  18. margin-bottom: 0.25rem;
  19. border-radius: 0.05rem;
  20. background-color: #fff;
  21. }
  22. .shopping img {
  23. width: 100%;
  24. height: auto;
  25. }
  26. .shopping {
  27. display: grid;
  28. grid-template-columns: repeat(2, 1fr);
  29. gap: 0.1rem;
  30. grid-auto-rows: auto;
  31. }
  32. main .shoppingc img {
  33. width: 100%;
  34. height: auto;
  35. border-top-left-radius: 0.05rem;
  36. border-top-right-radius: 0.05rem;
  37. }
  38. .shopping a p {
  39. margin: 0.06rem 0.1rem;
  40. height: 0.32rem;
  41. line-height: 0.16rem;
  42. overflow: hidden;
  43. }
  44. .shopping .bq span:first-child {
  45. color: red;
  46. margin-right: 0.1rem;
  47. }
  48. .shopping .bq span:nth-of-type(2) {
  49. color: #999;
  50. }
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!