微信小程序-轮播图swiper

微信小程序-swiper


indicator-dots 属性:显示面板指示点->图片下面那几个小点。
indicator-color 属性:指示点颜色。
indicator-active-color 属性: 当前选中的指示点颜色。
autoplay 属性:是否自动切换。
interval 属性:自动切换时间间隔。
circular 属性:是否采用衔接滑动。

list.wxml:

<swiper class="swiper-container" indicator-dots>
  <swiper-item>![请添加图片描述](https://img-blog.csdnimg.cn/bebdf2f49fbe40b6a731963c599b5fd2.gif)

    <view class="v1">A</view>
  </swiper-item>
  <swiper-item>
    <view class="v1">B</view>
  </swiper-item>
  <swiper-item>
    <view class="v1">C</view>
  </swiper-item>
</swiper>

list.wcss:

.swiper-container{
  height: 150px;
}
.v1{
  height: 100%;
  line-height: 150px;
  text-align: center;
}
swiper-item:nth-child(1) .v1{
  background-color: lightgreen;
}
swiper-item:nth-child(2) .v1{
  background-color: lightblue;
}
swiper-item:nth-child(3) .v1{
  background-color: lightcoral;
}

请添加图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值