移动端图片轮播?

移动端图片轮播?

在移动端的时候,经常会遇到好多图片,可以用手滑动来实现轮播?好吧,我也不知道是不是应该叫轮播,但是类似的就是那种效果。
把
//html
<div class="product-exihibate">
    <ul>
        <li class="item" v-on:click="productDetail(desc.desc_id)" v-for="desc in product.desc_list">
            <img class="product-pic" src="{{desc.title_image}}" alt="">
            <p class="product-name">{{desc.title}}</p>
            <p class="product-aims">{{desc.second_title}}</p>
        </li>
    </ul>
</div>

//css
.product-exihibate{
padding-top: 1rem;
overflow:auto;
}
.product-exihibate ul{
display: flex;
height: 10.5rem;
width: auto;
overflow-x: auto;
background-color: white;
}
::-webkit-scrollbar{ display:none;}
.item{
list-style: none;
display: inline-block;
width: 8rem;
height: 9.6rem;
margin-right: 1rem;
padding-bottom: 0.3rem;
background-color: #f5f5f5;
text-align: center;
}
.item img{
height: 6.01rem;
width: 8rem;
}
.product-name{
width: 8rem;
color: #333;
font-size: 1.05rem;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.product-aims{
margin-top: 0.3rem;
width: 8rem;
color: #777;
font-size: 0.85rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值