欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

商城列表页及商品详情页

程序员文章站 2022-03-13 13:56:58
...

CSS代码块分散不好上传。这里只贴图及上html代码

商品列表

商城列表页及商品详情页

商品详情

商城列表页及商品详情页

商品列表html代码

  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="stylesheet" href="./css/base.css">
  7. <link rel="stylesheet" href="./font/iconfont.css">
  8. <link rel="stylesheet" href="./css/index.css">
  9. <link rel="stylesheet" href="./css/list.css">
  10. <title>商品列表页面</title>
  11. </head>
  12. <body>
  13. <!-- 头部 -->
  14. <header class="flex-between container margin-auto">
  15. <div>
  16. <img src="./img/logo.png" alt="" class="width-80">
  17. </div>
  18. <div class="flex-center">
  19. <a href="#" class="margin-top-5 font-15">登录</a>
  20. <span class="margin-top-5"></span>
  21. <a href="#" class="margin-top-5 font-15">注册</a>
  22. <div class="border-bottom-black-1 margin-left-10 padding-lr-5">
  23. <input type="text" name="search" placeholder="热门搜索:细说php" id="search" class="border-none">
  24. <label for="search"><a href=""><i class="iconfont icon-sousuo color120"></i></a></label>
  25. </div>
  26. <div class="margin-top-5">
  27. <a href=""><i class="iconfont icon-yonghu color120 margin-left-15 font-18"></i></a>
  28. <a href=""><i class="iconfont icon-erweima color120 margin-left-10 font-18"></i></a>
  29. <a href=""><i class="iconfont icon-gouwuche1 color120 margin-left-10 font-18"></i></a>
  30. </div>
  31. </div>
  32. </header>
  33. <!-- 导航 -->
  34. <nav class="margin-top-20">
  35. <ul class="flex-center">
  36. <li class="margin-lr-20 border-bottom-red-2">首页</li>
  37. <li class="margin-lr-20 border-bottom-red-2">编程图书
  38. <section class="margin-top-12">
  39. <ul>
  40. <li>细说PHP</li>
  41. <li>细说PHP</li>
  42. <li>细说PHP</li>
  43. <li>细说PHP</li>
  44. </ul>
  45. </section>
  46. </li>
  47. <li class="margin-lr-20 border-bottom-red-2">算法图书</li>
  48. <li class="margin-lr-20 border-bottom-red-2">AI图书</li>
  49. <li class="margin-lr-20 border-bottom-red-2">人工智能</li>
  50. </ul>
  51. </nav>
  52. <!-- 轮播图 -->
  53. <section class="width-100 overflow-hiden banner">
  54. <div class="banner-paused">
  55. <a href="">
  56. <img src="./img/001.jpeg" alt="">
  57. </a>
  58. <a href="">
  59. <img src="./img/2.jpeg" alt="">
  60. </a>
  61. <a href="">
  62. <img src="./img/3.jpeg" alt="">
  63. </a>
  64. </div>
  65. </section>
  66. <!-- 右侧功能 -->
  67. <div class="sidebar">
  68. <i class="iconfont icon-gouwuche1 color120 font-18 sidebar-bottom"></i>
  69. <i class="iconfont icon-sousuo color120 font-18 sidebar-bottom"></i>
  70. <i class="iconfont icon-yonghu color120 font-18 sidebar-bottom"></i>
  71. <i class="iconfont icon-yonghu color120 font-18 sidebar-bottom"></i>
  72. </div>
  73. <!-- 导航 -->
  74. <section class="daohang">
  75. <span>首页</span>
  76. <span>/</span>
  77. <span>编程书籍</span>
  78. <span>/</span>
  79. <span>细说系列</span>
  80. </section>
  81. <!-- 标题 -->
  82. <section class="list-content">
  83. <div class="list-title">
  84. 细说系列
  85. </div>
  86. <div class="list-select">
  87. <div class="list-select1">
  88. <span>排序方式</span>
  89. <i class="iconfont icon-htmal5icon03"></i>
  90. </div>
  91. <div class="list-select2">
  92. <div>新品上市</div>
  93. <div>销量从高到低</div>
  94. <div>销量从低到高</div>
  95. <div>价格从高到低</div>
  96. <div>价格从低到高</div>
  97. </div>
  98. </div>
  99. </section>
  100. <!-- 商品 -->
  101. <section class="list-goods">
  102. <div class="list-goods-card">
  103. <img src="./img/pro01.jpg" alt="">
  104. <p style="font-size: 12px;">【细说】细说PHP</p>
  105. <p class="list-price">¥159.00</p>
  106. </div>
  107. <div class="list-goods-card">
  108. <img src="./img/pro01.jpg" alt="">
  109. <p style="font-size: 12px;">【细说】细说PHP</p>
  110. <p class="list-price">¥159.00</p>
  111. </div>
  112. <div class="list-goods-card">
  113. <img src="./img/pro01.jpg" alt="">
  114. <p style="font-size: 12px;">【细说】细说PHP</p>
  115. <p class="list-price">¥159.00</p>
  116. </div>
  117. <div class="list-goods-card">
  118. <img src="./img/pro01.jpg" alt="">
  119. <p style="font-size: 12px;">【细说】细说PHP</p>
  120. <p class="list-price">¥159.00</p>
  121. </div>
  122. </section>
  123. <!-- 底部 -->
  124. <footer>
  125. <section class="shouhou">
  126. <div class="shouhou-card">
  127. <img src="./img/foot1.png" alt="">
  128. <p class="font-14">7天无理由退货</p>
  129. </div>
  130. <div class="shouhou-card">
  131. <img src="./img/foot2.png" alt="">
  132. <p class="font-14">15天免费换货</p>
  133. </div>
  134. <div class="shouhou-card">
  135. <img src="./img/foot3.png" alt="">
  136. <p class="font-14">满599包邮</p>
  137. </div>
  138. <div class="shouhou-card4">
  139. <img src="./img/foot4.png" alt="">
  140. <p class="font-14">手机特色服务</p>
  141. </div>
  142. </section>
  143. <section class="footer">
  144. <p>最家家居©2013-2017公司版权所有 京ICP备080100-44备0000111000号</p>
  145. <p>违法和不良信息举报电话:400-800-8200,本网站所列数据,除特殊说明,所有数据均出自我司实验室测试</p>
  146. </section>
  147. </footer>
  148. </body>
  149. </html>

商品详情html代码

  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="stylesheet" href="./css/base.css">
  7. <link rel="stylesheet" href="./font/iconfont.css">
  8. <link rel="stylesheet" href="./css/index.css">
  9. <link rel="stylesheet" href="./css/list.css">
  10. <link rel="stylesheet" href="./css/info.css">
  11. <title>商品详情页面</title>
  12. </head>
  13. <body>
  14. <!-- 头部 -->
  15. <header class="flex-between container margin-auto">
  16. <div>
  17. <img src="./img/logo.png" alt="" class="width-80">
  18. </div>
  19. <div class="flex-center">
  20. <a href="#" class="margin-top-5 font-15">登录</a>
  21. <span class="margin-top-5"></span>
  22. <a href="#" class="margin-top-5 font-15">注册</a>
  23. <div class="border-bottom-black-1 margin-left-10 padding-lr-5">
  24. <input type="text" name="search" placeholder="热门搜索:细说php" id="search" class="border-none">
  25. <label for="search"><a href=""><i class="iconfont icon-sousuo color120"></i></a></label>
  26. </div>
  27. <div class="margin-top-5">
  28. <a href=""><i class="iconfont icon-yonghu color120 margin-left-15 font-18"></i></a>
  29. <a href=""><i class="iconfont icon-erweima color120 margin-left-10 font-18"></i></a>
  30. <a href=""><i class="iconfont icon-gouwuche1 color120 margin-left-10 font-18"></i></a>
  31. </div>
  32. </div>
  33. </header>
  34. <!-- 导航 -->
  35. <nav class="margin-top-20">
  36. <ul class="flex-center">
  37. <li class="margin-lr-20 border-bottom-red-2">首页</li>
  38. <li class="margin-lr-20 border-bottom-red-2">编程图书
  39. <section class="margin-top-12">
  40. <ul>
  41. <li>细说PHP</li>
  42. <li>细说PHP</li>
  43. <li>细说PHP</li>
  44. <li>细说PHP</li>
  45. </ul>
  46. </section>
  47. </li>
  48. <li class="margin-lr-20 border-bottom-red-2">算法图书</li>
  49. <li class="margin-lr-20 border-bottom-red-2">AI图书</li>
  50. <li class="margin-lr-20 border-bottom-red-2">人工智能</li>
  51. </ul>
  52. </nav>
  53. <!-- 轮播图 -->
  54. <section class="width-100 overflow-hiden banner">
  55. <div class="banner-paused">
  56. <a href="">
  57. <img src="./img/001.jpeg" alt="">
  58. </a>
  59. <a href="">
  60. <img src="./img/2.jpeg" alt="">
  61. </a>
  62. <a href="">
  63. <img src="./img/3.jpeg" alt="">
  64. </a>
  65. </div>
  66. </section>
  67. <!-- 右侧功能 -->
  68. <div class="sidebar">
  69. <i class="iconfont icon-gouwuche1 color120 font-18 sidebar-bottom"></i>
  70. <i class="iconfont icon-sousuo color120 font-18 sidebar-bottom"></i>
  71. <i class="iconfont icon-yonghu color120 font-18 sidebar-bottom"></i>
  72. <i class="iconfont icon-yonghu color120 font-18 sidebar-bottom"></i>
  73. </div>
  74. <!-- 导航 -->
  75. <section class="daohang">
  76. <span>首页</span>
  77. <span>/</span>
  78. <span>编程书籍</span>
  79. <span>/</span>
  80. <span>细说系列</span>
  81. <span>/</span>
  82. <span>细说php</span>
  83. </section>
  84. <!-- 大图及购买 -->
  85. <section class="flex-between width-80 margin-auto margin-top-40">
  86. <div class="width-50">
  87. <div>
  88. <img src="./img/proDet01_big.jpg" alt="" >
  89. </div>
  90. <div class="flex-start">
  91. <img src="./img/proDet01.jpg" alt="">
  92. <img src="./img/proDet01.jpg" alt="">
  93. <img src="./img/proDet01.jpg" alt="">
  94. <img src="./img/proDet01.jpg" alt="">
  95. </div>
  96. </div>
  97. <div class="width-50">
  98. <div class="border-bottom-black-1">
  99. <h2>[细说] 细说PHP</h2>
  100. <p class="font-12 color-8c8c8c margin-top-20">【破损补寄】【适合放室内、卧室、书房、餐桌、办公室、客厅、电视柜等地方】【无理由退换货】【包邮】【白色现代简约花瓶】</p>
  101. <span class="color120 font-weight-bold font-16 margin-bottom-40 block margin-top-20">¥ 159.00</span>
  102. </div>
  103. <div class="border-bottom-black-1">
  104. <p class="margin-top-20">颜色分类</p>
  105. <div class="flex-start margin-bottom-20 margin-top-12">
  106. <img src="./img/proDet01.jpg" alt="" class="img-color">
  107. <img src="./img/proDet01.jpg" alt="" class="img-color margin-left-15">
  108. <img src="./img/proDet01.jpg" alt="" class="img-color margin-left-15">
  109. <img src="./img/proDet01.jpg" alt="" class="img-color margin-left-15">
  110. </div>
  111. <p>
  112. 数量 库存 <span class="color120">2000</span>
  113. </p>
  114. <div class="fuhao margin-bottom-40 margin-top-20">
  115. <span class="mouse-point">-</span>
  116. <input type="text" value="1" class="book-number">
  117. <span class="mouse-point">+</span>
  118. </div>
  119. </div>
  120. <div class="margin-top-40 flex-around">
  121. <button class="goumai">立即购买</button>
  122. <button class="gouwuche">加入购物车</button>
  123. </div>
  124. </div>
  125. </section>
  126. <!-- 商品详情 -->
  127. <section class="width-80 margin-auto margin-top-40 flex-between">
  128. <div style="width: 950px;">
  129. <nav class="border-top-ccc-1 padding-10">
  130. <a href="" class="font-12 font-weight-bold border-bottom-120 padding-10">商品详情</a>
  131. <a href="" class="margin-left-15 font-12 padding-10">所有评价</a>
  132. </nav>
  133. <div class="border-top-ccc-1">
  134. <img src="./img/det01.jpg" alt="">
  135. <img src="./img/det01.jpg" alt="">
  136. <img src="./img/det01.jpg" alt="">
  137. <img src="./img/det01.jpg" alt="">
  138. <img src="./img/det01.jpg" alt="">
  139. </div>
  140. </div>
  141. <div class="tuijian">
  142. <p class="tuijian-text">为您推荐</p>
  143. <div class="padding-lr-10 margin-top-12">
  144. <img src="./img/see01.jpg" alt="">
  145. <p>【细说】细说PHP</p>
  146. <p class="margin-top-5">¥158.00</p>
  147. </div>
  148. <div class="padding-lr-10 margin-top-12">
  149. <img src="./img/see01.jpg" alt="">
  150. <p>【细说】细说PHP</p>
  151. <p class="margin-top-5">¥158.00</p>
  152. </div>
  153. <div class="padding-lr-10 margin-top-12">
  154. <img src="./img/see01.jpg" alt="">
  155. <p>【细说】细说PHP</p>
  156. <p class="margin-top-5">¥158.00</p>
  157. </div>
  158. <div class="padding-lr-10 margin-top-12 margin-bottom-20">
  159. <img src="./img/see01.jpg" alt="">
  160. <p>【细说】细说PHP</p>
  161. <p class="margin-top-5">¥158.00</p>
  162. </div>
  163. </div>
  164. </section>
  165. <!-- 猜你喜欢 -->
  166. <section class="xihuan">
  167. <p class="font-18">猜你喜欢</p>
  168. <div class="flex-around margin-bottom-40">
  169. <div class="jiantou"><</div>
  170. <div>
  171. <img src="./img/like04.jpg" alt="">
  172. <p class="font-14 margin-top-20">【细说】细说PHP</p>
  173. <p class="font-14 margin-top-12 color120">¥158.00</p>
  174. </div>
  175. <div>
  176. <img src="./img/like04.jpg" alt="">
  177. <p class="font-14 margin-top-20">【细说】细说PHP</p>
  178. <p class="font-14 margin-top-12 color120">¥158.00</p>
  179. </div>
  180. <div>
  181. <img src="./img/like04.jpg" alt="">
  182. <p class="font-14 margin-top-20">【细说】细说PHP</p>
  183. <p class="font-14 margin-top-12 color120">¥158.00</p>
  184. </div>
  185. <div>
  186. <img src="./img/like04.jpg" alt="">
  187. <p class="font-14 margin-top-20">【细说】细说PHP</p>
  188. <p class="font-14 margin-top-12 color120">¥158.00</p>
  189. </div>
  190. <div class="jiantou">></div>
  191. </div>
  192. </section>
  193. <!-- 底部 -->
  194. <footer>
  195. <section class="shouhou">
  196. <div class="shouhou-card">
  197. <img src="./img/foot1.png" alt="">
  198. <p class="font-14">7天无理由退货</p>
  199. </div>
  200. <div class="shouhou-card">
  201. <img src="./img/foot2.png" alt="">
  202. <p class="font-14">15天免费换货</p>
  203. </div>
  204. <div class="shouhou-card">
  205. <img src="./img/foot3.png" alt="">
  206. <p class="font-14">满599包邮</p>
  207. </div>
  208. <div class="shouhou-card4">
  209. <img src="./img/foot4.png" alt="">
  210. <p class="font-14">手机特色服务</p>
  211. </div>
  212. </section>
  213. <section class="footer">
  214. <p>最家家居©2013-2017公司版权所有 京ICP备080100-44备0000111000号</p>
  215. <p>违法和不良信息举报电话:400-800-8200,本网站所列数据,除特殊说明,所有数据均出自我司实验室测试</p>
  216. </section>
  217. </footer>
  218. </body>
  219. </html>