Owl Carousel 2 - autoHeight (multiple items)

后端 未结 4 2029
粉色の甜心
粉色の甜心 2021-01-13 09:25

At the moment the Owl Carousel autoHeight works only with 1 item on screen. Their plan is to calculate all visible items and change height according to highest item.

<
4条回答
  •  误落风尘
    2021-01-13 10:04

    I had same issue. I only resolved adding a autoWidth:true, and it works now!

    My owl script is:

     $('.owl-carousel').owlCarousel({
      loop: false,
      margin: 10,
      items: 1,
      autoHeight: true,
      autoWidth: true,
      nav: true,
      navText: [
        "",
        ""
      ],
      autoplay: true,
      autoplayHoverPause: true,
      responsive: {
        0: {
          items: 1
        },
        600: {
          items: 3
        },
        1000: {
          items: 5
        }
      }
    })
    

提交回复
热议问题