更改猫头鹰传送带2中不同大小的物品计数

时间:2019-09-01 20:14:59

标签: javascript jquery owl-carousel-2

m using owl-Carousel 2 . I want to change Items Count in different media Queries . I也使用Bootstrap(如果它有助于html BS的特殊属性)

1 个答案:

答案 0 :(得分:-1)

documentation中所述,您可以按照其示例使用responsive设置:

$('.owl-carousel').owlCarousel({
    loop:true,
    margin:10,
    nav:true,
    responsive:{
        0:{ //for width 0px and up
            items:1 //show only one item at a time
        },
        600:{ //for width 600px and up
            items:3 //show 3 items at a time
        },
        1000:{ //for width 1000px and up
            items:5 //show 5 items at a time
        }
    }
});
相关问题