我正在努力让猫头鹰的事情继续下去,它确实让我重新开始了一个项目。
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
</head>
<body>
<script src="js/jquery-1.11.3.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script>
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
nav:true,
responsive:{
0:{
items:1
},
600:{
items:3
},
1000:{
items:5
}
}
})
</script>
<div class="owl-carousel">
<div class="item"><img src = "img/bg1.jpg"></div>
<div class="item"><img src = "img/bg2.jpg"></div>
<div class="item"><img src = "img/bg3.jpg"></div>
<div class="item"><img src = "img/bg4.jpg"></div>
<div class="item"><img src = "img/bg5.jpg"></div>
<div class="item"><img src = "img/bg6.jpg"></div>
<div class="item"><img src = "img/bg7.jpg"></div>
<div class="item"><img src = "img/bg8.jpg"></div>
<div class="item"><img src = "img/bg9.jpg"></div>
<div class="item"><img src = "img/bg10.jpg"></div>
<div class="item"><img src = "img/bg11.jpg"></div>
<div class="item"><img src = "img/bg12.jpg"></div>
</div>
</body>
</html>
我做错了什么?
这是工作代码,您在配置中错过了 autoplay 属性
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
nav:true,
autoPlay: 1000,
responsive:{
0:{
items:1
},
600:{
items:3
},
1000:{
items:5
}
}
})
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>
<div class="owl-carousel">
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
<div class="item"><img src = "http://placehold.it/350x150"></div>
</div>
只需在CSS中添加这部分即可解决您的问题
.owl-stage-outer{
direction: ltr;
}