loopedSlides
在loop模式下使用slidesPerview:'auto',还需使用该参数设置所要用到的loop个数。
loopedSlides参数
- 类型:
- number
- 默认:
- 1
- 举例:
- 8
- 启用版本:
- 3.0.0
效果演示
8
使用方法示例
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide blue-slide">
slider1</div>
<div class="swiper-slide red-slide">
slider2</div>
<div class="swiper-slide orange-slide">
slider3</div>
<div class="swiper-slide green-slide">
slider4</div>
<div class="swiper-slide pink-slide">
slider5</div>
<div class="swiper-slide red-slide">
slider6</div>
<div class="swiper-slide blue-slide">
slider7</div>
<div class="swiper-slide orange-slide">
slider8</div>
</div>
</div>
<script>
var mySwiper = new Swiper('.swiper-container',{
loop : true,
slidesPerView : 'auto',
loopedSlides :8,
})
</script>
转载原创文章请注明:文章转载自:Swiper中文网 [https://3.swiper.com.cn]
本文地址:https://3.swiper.com.cn/api/Loop/2014/1215/25.html
上一篇:loopAdditionalSlides
下一篇:没有了