Blogger Information
Blog 25
fans 0
comment 0
visits 10724
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
淘宝pc端
PHui
Original
332 people have browsed it
  1. <div class="wrap">
  2. <!-- (1) 头部 -->
  3. <header>
  4. <!-- 1. 顶部导航 -->
  5. <div class="top">
  6. <div class="content">
  7. <div class="left">
  8. <span>中国大陆</span><span>亲,请登录</span><span>免费注册</span
  9. ><span>手机版淘宝</span><span>网页无障碍</span>
  10. </div>
  11. <div class="right">
  12. <span>我的淘宝</span><span>购物车</span><span>收藏夹</span
  13. ><span>商品分类</span><span>免费开店</span
  14. ><span>千牛卖家中心</span><span>联系客服</span>
  15. </div>
  16. </div>
  17. </div>
  18. <!-- 2. 快速入口 -->
  19. <div class="entry">
  20. <div class="content">
  21. <div class="item logo">
  22. <img
  23. src="https://img.alicdn.com/imgextra/i4/O1CN01msQc331nBPJrr2JBP_!!6000000005051-2-tps-360-320.png"
  24. alt=""
  25. />
  26. </div>
  27. <div class="item entry">
  28. <h2>家装百科</h2>
  29. <img
  30. src="https://img.alicdn.com/bao/uploaded/O1CN01qyrTwp1kzNewbTMsT_!!6000000004754-0-yinhe.jpg_80x80q90.jpg_.webp"
  31. alt=""
  32. />
  33. </div>
  34. <div class="item entry">
  35. <h2>家装百科</h2>
  36. <img
  37. src="https://img.alicdn.com/bao/uploaded/O1CN01qyrTwp1kzNewbTMsT_!!6000000004754-0-yinhe.jpg_80x80q90.jpg_.webp"
  38. alt=""
  39. />
  40. </div>
  41. <div class="item entry">
  42. <h2>家装百科</h2>
  43. <img
  44. src="https://img.alicdn.com/bao/uploaded/O1CN01qyrTwp1kzNewbTMsT_!!6000000004754-0-yinhe.jpg_80x80q90.jpg_.webp"
  45. alt=""
  46. />
  47. </div>
  48. <div class="item entry">
  49. <h2>家装百科</h2>
  50. <img
  51. src="https://img.alicdn.com/bao/uploaded/O1CN01qyrTwp1kzNewbTMsT_!!6000000004754-0-yinhe.jpg_80x80q90.jpg_.webp"
  52. alt=""
  53. />
  54. </div>
  55. <div class="item entry">
  56. <h2>家装百科</h2>
  57. <img
  58. src="https://img.alicdn.com/bao/uploaded/O1CN01qyrTwp1kzNewbTMsT_!!6000000004754-0-yinhe.jpg_80x80q90.jpg_.webp"
  59. alt=""
  60. />
  61. </div>
  62. </div>
  63. </div>
  64. </header>
  65. <!-- (2) 主体 -->
  66. <main>
  67. <!-- 1. 搜索框 -->
  68. <div class="search">
  69. <div class="item logo">
  70. <div class="iconfont icon-taobaowang"></div>
  71. </div>
  72. <div class="item input"></div>
  73. <div class="item ewm"></div>
  74. </div>
  75. <!-- 2. 导航区 -->
  76. <div class="navs">
  77. <!-- 1. 左侧分类 -->
  78. <div class="cate">
  79. <div class="item"></div>
  80. <div class="item"></div>
  81. <div class="item"></div>
  82. <div class="item"></div>
  83. <div class="item"></div>
  84. <div class="item"></div>
  85. <div class="item"></div>
  86. <div class="item"></div>
  87. <div class="item"></div>
  88. </div>
  89. <!-- 2. 在侧轮播图与用户信息 -->
  90. <div class="user">
  91. <!-- 1. 顶部导航 -->
  92. <div class="user-top">
  93. <span></span><span></span><span></span><span></span><span></span
  94. ><span></span><span></span><span></span>
  95. </div>
  96. <!-- 左侧轮播图 -->
  97. <div class="slider"></div>
  98. <!-- 右侧用户信息 -->
  99. <div class="user-info">
  100. <div class="logo">
  101. <img
  102. src="//wwc.alicdn.com/avatar/getAvatar.do?userNick=&width=60&height=60&type=sns&_input_charset=UTF-8"
  103. alt=""
  104. /><span>hi,你好</span>
  105. </div>
  106. <div class="button">
  107. <div class="item"><span>登录</span></div>
  108. <div class="item"><span>注册</span></div>
  109. <div class="item"><span>开店</span></div>
  110. </div>
  111. <div class="user-shop">
  112. <div class="item"><span>宝贝收藏</span></div>
  113. <div class="item"><span>买过的店</span></div>
  114. <div class="item"><span>收藏的店</span></div>
  115. <div class="item"><span>我的足迹</span></div>
  116. </div>
  117. <div class="user-xx"></div>
  118. </div>
  119. </div>
  120. </div>
  121. <!-- 3. 标题区 -->
  122. <div class="title">
  123. <h2>猜你喜欢</h2>
  124. <div class="tag">个性推荐</div>
  125. </div>
  126. <!-- 4. 商品列表 -->
  127. <div class="list">
  128. <div class="item">
  129. <a href=""
  130. ><img
  131. src="https://gw.alicdn.com/bao/uploaded/i4/3464966875/O1CN01hAYSqs20eniw9kTpg_!!0-item_pic.jpg_300x300q90.jpg_.webp"
  132. alt=""
  133. /></a>
  134. <div class="detail">
  135. <div class="desc">商品描述商品描述商品描述商品描述</div>
  136. <div class="price">159</div>
  137. </div>
  138. </div>
  139. <div class="item">
  140. <a href=""
  141. ><img
  142. src="https://gw.alicdn.com/bao/uploaded/i4/2969020084/O1CN01ZYDxSC1CUW3cOcReb_!!0-saturn_solar.jpg_300x300q90.jpg_.webp"
  143. alt=""
  144. /></a>
  145. <div class="detail">
  146. <div class="desc">商品描述商品描述商品描述商品描述</div>
  147. <div class="price">159</div>
  148. </div>
  149. </div>
  150. <div class="item">
  151. <a href=""
  152. ><img
  153. src="https://gw.alicdn.com/bao/uploaded/i4/2969020084/O1CN01ZYDxSC1CUW3cOcReb_!!0-saturn_solar.jpg_300x300q90.jpg_.webp"
  154. alt=""
  155. /></a>
  156. <div class="detail">
  157. <div class="desc">商品描述商品描述商品描述商品描述</div>
  158. <div class="price">159</div>
  159. </div>
  160. </div>
  161. <div class="item">
  162. <a href=""
  163. ><img
  164. src="https://gw.alicdn.com/bao/uploaded/i4/2969020084/O1CN01ZYDxSC1CUW3cOcReb_!!0-saturn_solar.jpg_300x300q90.jpg_.webp"
  165. alt=""
  166. /></a>
  167. <div class="detail">
  168. <div class="desc">商品描述商品描述商品描述商品描述</div>
  169. <div class="price">159</div>
  170. </div>
  171. </div>
  172. <div class="item">
  173. <a href=""
  174. ><img
  175. src="https://gw.alicdn.com/bao/uploaded/i4/2969020084/O1CN01ZYDxSC1CUW3cOcReb_!!0-saturn_solar.jpg_300x300q90.jpg_.webp"
  176. alt=""
  177. /></a>
  178. <div class="detail">
  179. <div class="desc">商品描述商品描述商品描述商品描述</div>
  180. <div class="price">159</div>
  181. </div>
  182. </div>
  183. <div class="item">
  184. <a href=""
  185. ><img
  186. src="https://gw.alicdn.com/bao/uploaded/i4/2213118989895/O1CN01Lkqecj2MxxrWn06iJ_!!0-item_pic.jpg_300x300q90.jpg_.webp"
  187. alt=""
  188. /></a>
  189. <div class="detail">
  190. <div class="desc">商品描述商品描述商品描述商品描述</div>
  191. <div class="price">159</div>
  192. </div>
  193. </div>
  194. <div class="item">
  195. <a href=""><img src="" alt="" /></a>
  196. <div class="detail">
  197. <div class="desc">商品描述商品描述商品描述商品描述</div>
  198. <div class="price">159</div>
  199. </div>
  200. </div>
  201. <div class="item">
  202. <a href=""><img src="" alt="" /></a>
  203. <div class="detail">
  204. <div class="desc">商品描述商品描述商品描述商品描述</div>
  205. <div class="price">159</div>
  206. </div>
  207. </div>
  208. <div class="item">
  209. <a href=""><img src="" alt="" /></a>
  210. <div class="detail">
  211. <div class="desc">商品描述商品描述商品描述商品描述</div>
  212. <div class="price">159</div>
  213. </div>
  214. </div>
  215. <div class="item">
  216. <a href=""><img src="" alt="" /></a>
  217. <div class="detail">
  218. <div class="desc">商品描述商品描述商品描述商品描述</div>
  219. <div class="price">159</div>
  220. </div>
  221. </div>
  222. <div class="item">
  223. <a href=""><img src="" alt="" /></a>
  224. <div class="detail">
  225. <div class="desc">商品描述商品描述商品描述商品描述</div>
  226. <div class="price">159</div>
  227. </div>
  228. </div>
  229. <div class="item">
  230. <a href=""><img src="" alt="" /></a>
  231. <div class="detail">
  232. <div class="desc">商品描述商品描述商品描述商品描述</div>
  233. <div class="price">159</div>
  234. </div>
  235. </div>
  236. <div class="item">
  237. <a href=""><img src="" alt="" /></a>
  238. <div class="detail">
  239. <div class="desc">商品描述商品描述商品描述商品描述</div>
  240. <div class="price">159</div>
  241. </div>
  242. </div>
  243. <div class="item">
  244. <a href=""><img src="" alt="" /></a>
  245. <div class="detail">
  246. <div class="desc">商品描述商品描述商品描述商品描述</div>
  247. <div class="price">159</div>
  248. </div>
  249. </div>
  250. <div class="item">
  251. <a href=""><img src="images/items/item-11.webp" alt="" /></a>
  252. <div class="detail">
  253. <div class="desc">商品描述商品描述商品描述商品描述</div>
  254. <div class="price">159</div>
  255. </div>
  256. </div>
  257. <div class="item">
  258. <a href=""><img src="" alt="" /></a>
  259. <div class="detail">
  260. <div class="desc">商品描述商品描述商品描述商品描述</div>
  261. <div class="price">159</div>
  262. </div>
  263. </div>
  264. <div class="item">
  265. <a href=""><img src="" alt="" /></a>
  266. <div class="detail">
  267. <div class="desc">商品描述商品描述商品描述商品描述</div>
  268. <div class="price">159</div>
  269. </div>
  270. </div>
  271. </div>
  272. </main>
  273. </div>
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. box-sizing: border-box;
  5. }
  6. body {
  7. min-height: 3000px;
  8. }
  9. /* 头部:导航 */
  10. .wrap header .top {
  11. width: 100%;
  12. height: 36px;
  13. background-color: #f5f5f5;
  14. }
  15. .wrap header .top .content {
  16. width: 1190px;
  17. height: inherit;
  18. margin: auto;
  19. display: flex;
  20. place-content: space-between;
  21. }
  22. .wrap header .top .content .left {
  23. display: flex;
  24. place-items: center;
  25. }
  26. .wrap header .top .content .left span,
  27. .wrap header .top .content .right span {
  28. margin: 5px;
  29. }
  30. /* 头部:快速入口 */
  31. .wrap header .entry {
  32. height: 100px;
  33. width: 100%;
  34. padding: 15px;
  35. background-color: #ff727c;
  36. }
  37. .wrap header .entry .content {
  38. max-width: 1190px;
  39. min-width: 950px;
  40. height: inherit;
  41. margin: auto;
  42. display: grid;
  43. grid-template-columns: 80px repeat(5, 1fr);
  44. grid-auto-rows: 80px;
  45. gap: 10px;
  46. /* padding: 10px; */
  47. }
  48. .wrap header .entry .content .item {
  49. /* background-color: #bb727c; */
  50. border-radius: 15px;
  51. height: 75px;
  52. }
  53. .wrap header .entry .content .item.logo img,
  54. .wrap header .entry .content .item.entry img {
  55. width: 100%;
  56. }
  57. .wrap header .entry .content .item.entry {
  58. color: white;
  59. background-color: #fea775;
  60. display: grid;
  61. grid-template-columns: 1fr 70px;
  62. padding: 5px;
  63. }
  64. /* 主体 */
  65. .wrap main {
  66. max-width: 1190px;
  67. min-width: 950px;
  68. min-inline-size: 1000px;
  69. margin: auto;
  70. padding: 20px;
  71. background-color: green;
  72. }
  73. /* 搜索框 */
  74. .wrap main .search {
  75. height: 88px;
  76. display: grid;
  77. grid-template-columns: 190px 1fr 90px;
  78. /* place-items: center; */
  79. gap: 10px;
  80. /* 粘性定位 */
  81. position: sticky;
  82. top: 0;
  83. }
  84. .wrap main .search .item {
  85. background-color: #ffffff;
  86. }
  87. .wrap main .search .item .icon-taobaowang {
  88. color: orange;
  89. font-size: xx-large;
  90. }
  91. /* 导航区 */
  92. .wrap main .navs {
  93. height: 423px;
  94. margin: 20px 0;
  95. display: grid;
  96. grid-template-columns: 270px 1fr;
  97. gap: 10px;
  98. }
  99. .wrap main .navs > * {
  100. background-color: lightskyblue;
  101. }
  102. .wrap main .navs .cate {
  103. display: grid;
  104. grid-template-rows: repeat(9, 1fr);
  105. gap: 10px;
  106. }
  107. .wrap main .navs .cate > * {
  108. background-color: aliceblue;
  109. }
  110. /* 用户信息及轮播图 */
  111. .wrap main .navs .user {
  112. display: grid;
  113. grid-template-columns: 564px 1fr;
  114. grid-template-rows: 42px 1fr;
  115. gap: 10px;
  116. }
  117. .wrap main .navs .user > * {
  118. background-color: aliceblue;
  119. }
  120. .wrap main .navs .user-top {
  121. grid-column: span 2;
  122. display: grid;
  123. grid-template-columns: repeat(8, 1fr);
  124. gap: 10px;
  125. }
  126. .wrap main .navs .user-top > * {
  127. background-color: blue;
  128. }
  129. .wrap main .navs .user-info {
  130. display: grid;
  131. grid-template-rows: 106px 60px 1fr 40px;
  132. gap: 10px;
  133. }
  134. .wrap main .navs .user-info > * {
  135. background-color: lightblue;
  136. }
  137. .wrap main .navs .user-info .logo {
  138. padding-top: 10px;
  139. display: grid;
  140. grid-template-rows: repeat(2, 1fr);
  141. /* place-content: center center; */
  142. place-items: center center;
  143. }
  144. .wrap main .navs .user-info .button {
  145. display: grid;
  146. grid-template-columns: repeat(3, 1fr);
  147. place-items: center center;
  148. }
  149. .wrap main .navs .user-info .user-shop {
  150. display: grid;
  151. grid-template-columns: repeat(4, 1fr);
  152. place-items: center center;
  153. gap: 10px;
  154. }
  155. /* 标题区 */
  156. .wrap main .title {
  157. background-color: #fff;
  158. display: flex;
  159. place-items: end;
  160. }
  161. .wrap main .title .tag {
  162. background: linear-gradient(to left, orangered, orange);
  163. color: #fff;
  164. padding: 0 5px;
  165. border-radius: 5px;
  166. margin-left: 5px;
  167. margin-bottom: 1px;
  168. }
  169. /* 商品列表 */
  170. .wrap main .list {
  171. margin: 20px 0;
  172. display: grid;
  173. grid-template-columns: repeat(3, 1fr);
  174. grid-auto-rows: 172px;
  175. gap: 10px;
  176. }
  177. .wrap main .list .item {
  178. background-color: rgb(244, 239, 239);
  179. border-radius: 6px;
  180. display: grid;
  181. grid-template-columns: 150px 1fr;
  182. padding: 10px;
  183. gap: 10px;
  184. }
  185. .wrap main .list .item img {
  186. width: 100%;
  187. border-radius: 6px;
  188. }
  189. .wrap main .list .item .detail {
  190. display: grid;
  191. grid-template-rows: 1fr 35px;
  192. }
  193. /* 媒体查询 */
  194. @media (max-width: 950px) {
  195. .wrap header .entry .content {
  196. grid-template-columns: 80px repeat(4, 1fr);
  197. }
  198. .wrap main .navs {
  199. grid-template-columns: 1fr;
  200. }
  201. .wrap main .navs .cate {
  202. display: none;
  203. }
  204. .wrap main .list {
  205. grid-template-columns: repeat(2, 1fr);
  206. }
  207. }

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