Blogger Information
Blog 18
fans 0
comment 0
visits 7890
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
淘宝移动端首页的商品列表
只如初见
Original
472 people have browsed it

淘宝移动端首页的商品列表

代码

  1. <!-- 产品列表 -->
  2. <div class="plist">
  3. <div class="plist_t"><img src="images/xihuan.png" /></div>
  4. <div class="plist_c">
  5. <div>
  6. <a href="#">
  7. <img src="images/p_list.jpg" />
  8. <p>吃牛排的刀叉三件套西餐套装餐具刀勺全套两家用盘西餐具盘子儿童</p>
  9. <div><span>¥12.9</span><span>2000+人已购买</span></div>
  10. </a>
  11. </div>
  12. <div>
  13. <a href="#">
  14. <img src="images/p_list2.jpg" />
  15. <p>吃牛排的刀叉三件套西餐套装餐具刀勺全套两家用盘西餐具盘子儿童</p>
  16. <div><span>¥12.9</span><span>2000+人已购买</span></div>
  17. </a>
  18. </div>
  19. <div>
  20. <a href="#">
  21. <img src="images/p_list.jpg" />
  22. <p>吃牛排的刀叉三件套西餐套装餐具刀勺全套两家用盘西餐具盘子儿童</p>
  23. <div><span>¥12.9</span><span>2000+人已购买</span></div>
  24. </a>
  25. </div>
  26. <div>
  27. <a href="#">
  28. <img src="images/p_list2.jpg" />
  29. <p>吃牛排的刀叉三件套西餐套装餐具刀勺全套两家用盘西餐具盘子儿童</p>
  30. <div><span>¥12.9</span><span>2000+人已购买</span></div>
  31. </a>
  32. </div>
  33. </div>
  34. </div>
  35. css样式
  36. main {
  37. padding-bottom: 0.5rem;
  38. }
  39. .plist {
  40. padding: 0.2rem 0;
  41. }
  42. .plist_t {
  43. text-align: center;
  44. margin-bottom: 0.25rem;
  45. }
  46. .plist_t img {
  47. width: 50%;
  48. height: auto;
  49. }
  50. .plist_c {
  51. display: grid;
  52. grid-template-columns: repeat(2, 1fr);
  53. gap: 0.1rem;
  54. grid-auto-rows: auto;
  55. }
  56. .plist_c > div {
  57. border-radius: 0.05rem;
  58. background-color: #fff;
  59. }
  60. main .plist_c img {
  61. width: 100%;
  62. height: auto;
  63. border-top-left-radius: 0.05rem;
  64. border-top-right-radius: 0.05rem;
  65. }
  66. .plist_c > div > a > p {
  67. margin: 0.06rem 0.1rem;
  68. height: 0.32rem;
  69. line-height: 0.16rem;
  70. overflow: hidden;
  71. }
  72. .plist_c > div > a > div {
  73. padding: 0 0.1rem 0.1rem;
  74. }
  75. .plist_c > div > a > div span:first-child {
  76. color: red;
  77. margin-right: 0.1rem;
  78. }
  79. .plist_c > div > a > div span:nth-of-type(2) {
  80. color: #999;
  81. }

效果图

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!