美文网首页
swiper 基本用法

swiper 基本用法

作者: Yi_9565 | 来源:发表于2018-12-06 17:45 被阅读0次

    Progress(进度)

    watchSlidesProgress

    作用:开启这个参数来计算每个slide的progress(进度、进程)

    <script> 
    var mySwiper = new Swiper('.swiper-container',{
      watchSlidesProgress : true,
    })
    mySwiper.progress;
    mySwiper.slides[2].progress; //获取第三张slide的进度值
    </script>
    

    相关文章

      网友评论

          本文标题:swiper 基本用法

          本文链接:https://www.haomeiwen.com/subject/hueocqtx.html