Disabling Owl Carousel at a specific viewport width

前端 未结 5 1250
说谎
说谎 2021-02-19 17:38

I\'m currently using Owl Carousel to show a gallery on desktop/laptop sized devices. However on smaller devices I\'d like to disable the plugin and show each image stacked under

5条回答
  •  醉话见心
    2021-02-19 18:26

    Easier to use a CSS based solution

    @media screen and (max-width: 992px) {
      .owl-item.cloned{
        display: none !important;
      }
      .owl-stage{
        transform:none !important;
        transition: none !important;
        width: auto !important;
      }
      .owl-item{
        width: auto !important;
      }
    }

提交回复
热议问题