Blogger Information
Blog 24
fans 0
comment 0
visits 10940
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
淘宝首页框架
皮皮志
Original
376 people have browsed it
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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>Document</title>
  8. <link rel="stylesheet" href="reset.css">
  9. <style>
  10. .wrap header .top{
  11. width: 100vw;
  12. height: 36px;
  13. z-index: 10000;
  14. background-color: #f5f5f5;
  15. border-bottom: 1px solid #eee;
  16. }
  17. .wrap header .top .content{
  18. width: 1200px;
  19. height: inherit;
  20. background-color: wheat;
  21. margin: auto;
  22. }
  23. .wrap header .entry{
  24. height: 100px;
  25. padding: 15px;
  26. }
  27. .wrap header .entry .content {
  28. width: 1200px;
  29. height: inherit;
  30. background-color: cyan;
  31. margin: auto;
  32. display: grid;
  33. grid-template-columns: 80px repeat(5, 1fr);
  34. grid-auto-rows: 80px;
  35. gap: 10px;
  36. padding: 10px;
  37. }
  38. .wrap header .entry .content .item {
  39. background-color: lightcyan;
  40. border-radius: 15px;
  41. }
  42. .wrap main {
  43. width: 1200px;
  44. min-height: 1000px;
  45. margin: 20px auto;
  46. padding: 20px;
  47. background-color: lightgreen;
  48. }
  49. /* 搜索框 */
  50. .wrap main .search {
  51. height: 88px;
  52. display: grid;
  53. grid-template-columns: 190px 1fr 90px;
  54. gap: 10px;
  55. /* 粘性定位 */
  56. position: sticky;
  57. top: 0;
  58. }
  59. .wrap main .search .item {
  60. background-color: lightpink;
  61. }
  62. /* 主体导航区 */
  63. main .navs {
  64. height: 423px;
  65. margin: 20px 0;
  66. display: grid;
  67. grid-template-columns: 270px 1fr;
  68. gap: 10px;
  69. }
  70. main .navs > * {
  71. background-color: lightskyblue;
  72. }
  73. main .navs > .user {
  74. display: grid;
  75. /* 2行2列 */
  76. grid-template-columns: 564px 1fr;
  77. grid-template-rows: 42px 1fr;
  78. gap: 10px;
  79. }
  80. main .navs > .user > * {
  81. background-color: lightcyan;
  82. }
  83. main .navs > .user .user-top {
  84. grid-column: span 2;
  85. }
  86. /* 主体标题区 */
  87. main .title {
  88. background-color: lightcyan;
  89. display: flex;
  90. place-items: center;
  91. }
  92. main .title .tag {
  93. background: linear-gradient(to left, orangered, orange);
  94. color: white;
  95. border-radius: 5px;
  96. padding: 0 5px;
  97. margin-left: 6px;
  98. cursor: default;
  99. }
  100. /* 主体: 商品列表 */
  101. main .list {
  102. margin: 20px 0;
  103. display: grid;
  104. grid-template-columns: repeat(3, 1fr);
  105. grid-auto-rows: 172px;
  106. gap: 10px;
  107. }
  108. main .list > .item {
  109. background-color: lightcyan;
  110. border-radius: 6px;
  111. display: grid;
  112. grid-template-columns: 150px 1fr;
  113. gap: 10px;
  114. padding: 10px;
  115. }
  116. main .list > .item > * {
  117. background-color: wheat;
  118. border-radius: 6px;
  119. }
  120. main .list > .item img {
  121. width: 100%;
  122. border-radius: 6px;
  123. }
  124. main .list .item .detail {
  125. display: grid;
  126. grid-template-rows: 1fr 25px;
  127. padding: 10px;
  128. place-content: space-between;
  129. }
  130. main .list .item .detail > * {
  131. font: 12px/1.5 tahoma, arial, 'Hiragino Sans GB', '\5b8b\4f53', sans-serif;;
  132. }
  133. main .list .item .detail .desc{
  134. font-size: 16px;
  135. line-height: 23px;
  136. max-height: 46px;
  137. margin: 6px 0 2px 0;
  138. overflow: hidden;
  139. }
  140. main .list .item .detail .price{
  141. font-size: 22px;
  142. line-height: 22px;
  143. color: #ff5000;
  144. }
  145. </style>
  146. </head>
  147. <body>
  148. <div class="wrap">
  149. <header>
  150. <!-- 1. 顶部导航 -->
  151. <div class="top">
  152. <div class="content">顶部导航</div>
  153. </div>
  154. <!-- 2.快速入口 -->
  155. <div class="entry">
  156. <div class="content">
  157. <div class="item"></div>
  158. <div class="item"></div>
  159. <div class="item"></div>
  160. <div class="item"></div>
  161. <div class="item"></div>
  162. <div class="item"></div>
  163. </div>
  164. </div>
  165. </header>
  166. <!-- (2) 主体 -->
  167. <main>
  168. <!-- 1. 搜索框 -->
  169. <div class="search">
  170. <div class="item logo">logo</div>
  171. <div class="item input">搜索框</div>
  172. <div class="item ewm">二维码</div>
  173. </div>
  174. <!-- 2. 导航区 -->
  175. <div class="navs">
  176. <!-- 1. 左侧分类 -->
  177. <div class="cate">左侧大分类</div>
  178. <!-- 2. 在侧轮播图与用户信息 -->
  179. <div class="user">
  180. <!-- 1. 顶部导航 -->
  181. <div class="user-top">上部选项</div>
  182. <!-- 左侧轮播图 -->
  183. <div class="slider">轮播图</div>
  184. <!-- 右侧用户信息 -->
  185. <div class="user-info">用户信息</div>
  186. </div>
  187. </div>
  188. <!-- 3. 标题区 -->
  189. <div class="title">
  190. <h2>猜你喜欢</h2>
  191. <div class="tag">个性推荐</div>
  192. </div>
  193. <!-- 4. 商品列表 -->
  194. <div class="list">
  195. <div class="item">
  196. <a href=""><img src="" alt="" /></a>
  197. <div class="detail">
  198. <div class="desc">白灼汁白灼大虾凉拌好吃的零食网红2022新款排行榜爆款酱油调料</div>
  199. <div class="price">9.9</div>
  200. </div>
  201. </div>
  202. <div class="item">
  203. <a href=""><img src="" alt="" /></a>
  204. <div class="detail">
  205. <div class="desc">30ml雅诗兰黛dw的粉底液泵头原装持妆粉按压专用真空按压嘴喷头</div>
  206. <div class="price">5.6</div>
  207. </div>
  208. </div>
  209. <div class="item">
  210. <a href=""><img src="" alt="" /></a>
  211. <div class="detail">
  212. <div class="desc">客厅灯现代简约大气led吸顶灯广东中山智能灯具全屋套餐组合主灯</div>
  213. <div class="price">367.2</div>
  214. </div>
  215. </div>
  216. </div>
  217. </main>
  218. </div>
  219. </body>
  220. </html>

代码如下

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