为什么我的猫头鹰轮播自动播放无法正常工作?

时间:2019-01-11 08:44:43

标签: javascript html owl-carousel

我想问一下猫头鹰轮播的自动播放。 我已经创建了一些类似这样的html代码:

    <div class="owl-carousel">
    <div class="item"><img class="img-clients" src="img/img1.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img2.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img3.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img4.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img5.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img6.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img7.png" alt="" ></div>
    <div class="item"><img class="img-clients" src="img/img8.png" alt="" ></div>
    </div>

这是js文件:

$(document).ready(function (){
          $('.owl-carousel').owlCarousel({
            items:5,
            center:true,
            autoPlay:true,
            autoPlayTimeout:1000,
            autoplaySpeed:3000,
            autoHeight:true,
            autoplayHoverPause:true,
            loop:true,
            // smartSpeed:1000,
            margin:5,
            responsive:{
                480:{
                  items:3,
                  margin:2
                },
                919:{
                    items:4,
                    margin:4
                }
            }
          });
      });

但是似乎没有用。怎么了?有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

autoplay: true,

代替

autoPlay: true,