Blogger Information
Blog 33
fans 0
comment 0
visits 17112
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
淘宝移动端首页的商品列表代码实现
lucaslwk
Original
819 people have browsed it

淘宝移动端首页的商品列表代码实现

实现效果

html 部分

  1. <div class="item">
  2. <img src="image/7.png" alt="" />
  3. <span class="spanl"
  4. ><span class="title"
  5. >北欧简约床品件套 美式加大印花被套纯棉60支纱贡缎印花四件套</span
  6. >
  7. <span class="spans">
  8. <span class="price">¥ 279.5</span>
  9. <span class="number">6人已购买</span></span
  10. >
  11. </span>
  12. </div>

css 部分

  1. .main .maybelike {
  2. display: grid;
  3. grid-template-columns: repeat(2, 1fr);
  4. padding: 0.1rem;
  5. gap: 0.1rem;
  6. }
  7. .main .maybelike .item {
  8. width: 1.725rem;
  9. background-color: white;
  10. border-radius: 0.05rem;
  11. }
  12. .main .maybelike .item img {
  13. width: 100%;
  14. border-radius: 0.05rem 0.05rem 0 0;
  15. }
  16. .main .maybelike .item .spanl {
  17. padding: 0.1rem;
  18. font-size: 0.14rem;
  19. display: grid;
  20. gap: 0.05rem;
  21. }
  22. .main .maybelike .item .spanl .title {
  23. height: 0.4rem;
  24. overflow: hidden;
  25. }
  26. .main .maybelike .item .spans {
  27. display: flex;
  28. gap: 0.1rem;
  29. }
  30. .main .maybelike .item .spans .price {
  31. color: orangered;
  32. }
  33. .main .maybelike .item .spans .number {
  34. color: #888;
  35. font-size: 0.12rem;
  36. place-self: center;
  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