获取商品列表 HTML + CSS

 按照淘宝的列表样式,自行添加删除

html:

 <ul>
      <li class="pc-items-item">
            <a
            target="_blank"
            class="pc-items-item-a"
            >
            <img
              class="pc-items-item-img img-loaded"
              src=""/>
            <div class="pc-items-item-title ">
              <span class="title-text" ></span >
            </div>
              <span class="coupon-price-old">¥58.00</span>
           </a>
      </li> 
 </ul>

css:

  a {
    text-decoration: none;
    }
  a:-webkit-any-link {
    color: -webkit-link;
    cursor: pointer;
  }
     .pc-items-item-a {
    display: inline-block;
    width: 234px;
    height: 366px;
    box-sizing: border-box;
    padding: 22px 20px 0;
    background: #fff;
    position: relative;
  }
    .pc-search-items-list .pc-items-item {
    width: 236px;
    height: 368px;
    box-sizing: border-box;
    display: inline-block;
    font-size: 12px;
    border: 1px solid #f2f2f2;
    border-top: none;
    border-left: none;
    background: #fff;
    vertical-align: top;
  }
.pc-search-items-list {
    width: 1190px;
    font-size: 0;
    font-family: 'helvetica neue',tahoma,'hiragino sans gb',stheiti,'wenquanyi micro hei',sans-serif;
    border-top: 1px solid #f2f2f2;
    border-left: 1px solid #f2f2f2;
}
.pc-items-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: #9b9b9b;
    line-height: 20px;
    padding-top: 10px;
}
.coupon-price-old{
  margin-left: 4px;
    vertical-align: baseline;
    text-align: left;
    line-height: 25px;
    font-family: PingFangSC-Medium;
    font-size: 18px;
    color: #fd3f31;

}

.pc-items-item {
    text-align: -webkit-match-parent;
    margin-top: 20px;
}
.pc-items-item-a:hover {
    border: 1px solid #fd3f31;
    text-decoration: none;
    transform: translate(-1px,-1px);
}

.pc-items-item-img {
  width: 194px;
  height: 198px;
}
ul{
  /* width: 100%; */
  list-style: none;
  margin-left: 150px;
  display: flex;
  flex-wrap: wrap;
}

最后效果图:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值