how add spaces between owl carousel item

后端 未结 8 1002
醉酒成梦
醉酒成梦 2021-02-14 16:15

How can i add space between owl item. add margin or padding between items. this is need to be responsive.can i add some gutter in to the jquery.

8条回答
  •  囚心锁ツ
    2021-02-14 16:21

    .item{
        margin: 5px;
    } 
    .owl-item:nth-child(3n+1) > .item {
        margin-left: 0;
    }
    .owl-item:nth-child(3n+3) > .item {
        margin-right: 0;
    }
    

    Config OwlCarousel:

    $("#owl-highlight").owlCarousel({
                autoPlay: 3000,
                items : 3,
                scrollPerPage: true,
                itemsDesktop : [1199,3],
                itemsDesktopSmall : [979,3]
            });
    

提交回复
热议问题