我正在使用owl carousel 2插件来构建旋转木马。我希望它在大于480px的屏幕上有2行(每行3个项目),在小于480px的屏幕上有1行(有1个项目)。
可行吗?
以下是使用的代码。
<script>
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
nav:true,
responsive:{
0:{
items:1
},
480:{
items:3,
},
768:{
items:5
}
}
})
});
</script>