上章Swiper滑块2、Swiper滑块1都是手动的,这章我们来自动的!

其实只是加了Swiper的speed(滑动速度即slider自动滑动开始到结束的时间)属性而已(∩_∩),单位是ms

<script> 
var mySwiper = new Swiper('.swiper-container',{
autoplay : 3000,
speed:300,
})
</script>

我们来看看speed的参数:  

类型: number
默认: 300
举例: 1000

上代码:

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2021-11-24
  • 2022-12-23
  • 2021-05-29
  • 2021-09-05
  • 2021-07-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案