Blogger Information
Blog 15
fans 0
comment 0
visits 6305
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
仿淘宝商品列表
啊℃。㏄
Original
373 people have browsed it

仿淘宝商品列表练习

html:

  1. <div class="list">
  2. <div class="title">---------你可能还喜欢的---------</div>
  3. <div class="unit">
  4. <div class="img">
  5. <img src="../0328课件/imges/item17.webp" alt="">
  6. </div>
  7. <div class="dedail">
  8. <div class="desc">商品描述商品描述,商品描述商品描述,商品描述商品描述</div>
  9. <div class="plc"><span class="iconfont icon-renminbi1688">89</span><span class="num">2000+人购买</span></div>
  10. </div>
  11. </div>
  12. <div class="unit">
  13. <div class="img">
  14. <img src="../0328课件/imges/item18.webp" alt="">
  15. </div>
  16. <div class="dedail">
  17. <div class="desc">商品描述商品描述,商品描述商品描述,商品描述商品描述</div>
  18. <div class="plc"><span class="iconfont icon-renminbi1688">200</span><span class="num">2000+人购买</span></div>
  19. </div>
  20. </div>
  21. <div class="unit">
  22. <div class="img">
  23. <img src="../0328课件/imges/item19.webp" alt="">
  24. </div>
  25. <div class="dedail">
  26. <div class="desc">商品描述商品描述,商品描述商品描述,商品描述商品描述</div>
  27. <div class="plc"><span class="iconfont icon-renminbi1688">150</span><span class="num">10w+人购买</span></div>
  28. </div>
  29. </div>
  30. <div class="unit">
  31. <div class="img">
  32. <img src="../0328课件/imges/item20.webp" alt="">
  33. </div>
  34. <div class="dedail">
  35. <div class="desc">商品描述商品描述,商品描述商品描述,商品描述商品描述</div>
  36. <div class="plc"><span class="iconfont icon-renminbi1688">100</span><span class="num">100w+人购买</span></div>
  37. </div>
  38. </div>
  39. </div>

css:

  1. main .list {
  2. display: grid;
  3. grid-template-columns: repeat(2,1fr);
  4. gap: 0.1rem;
  5. padding: 0.1rem 0 0.5rem 0;
  6. }
  7. main .list .title {
  8. grid-column: span 2;
  9. text-align: center;
  10. color: darkorange;
  11. font-weight: bolder;
  12. padding: 10px 0;
  13. font-size: larger;
  14. }
  15. main .list .unit {
  16. background-color: #fff;
  17. display: grid;
  18. border-radius: 0.1rem;
  19. }
  20. main .list .unit img {
  21. border-radius: 0.1rem 0.1rem ;
  22. width: 100%;
  23. height: 100%;
  24. }
  25. main .list .unit .dedail {
  26. display: grid;
  27. padding: 0.1rem;
  28. gap: 0.1rem;
  29. }
  30. main .list .unit .dedail .plc .iconfont {
  31. color: orange;
  32. font-size: large;
  33. margin-right: 0.1rem;
  34. }
  35. main .list .unit .dedail .plc .num {
  36. color: #ccc;
  37. }

效果:

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