loopAdditionalSlides
loop模式下会在slides前后复制若干个slide,,前后复制的个数不会大于原总个数。
默认为0,前后各复制1个。0,1,2 --> 2,0,1,2,0
例:取值为1,0,1,2 --> 1,2,0,1,2,0,1
例:取值为2或以上,0,1,2 --> 0,1,2,0,1,2,0,1,2
默认为0,前后各复制1个。0,1,2 --> 2,0,1,2,0
例:取值为1,0,1,2 --> 1,2,0,1,2,0,1
例:取值为2或以上,0,1,2 --> 0,1,2,0,1,2,0,1,2
loopAdditionalSlides参数
- 类型:
- number
- 默认:
- 0
- 举例:
- 1
- 启用版本:
- 3.0.0
使用方法示例
<script>
var mySwiper = new Swiper('.swiper-container',{
loop : true,
loopAdditionalSlides : 1,
})
</script>
转载原创文章请注明:文章转载自:Swiper中文网 [https://3.swiper.com.cn]
本文地址:https://3.swiper.com.cn/api/Loop/2014/1215/23.html