【问题标题】:Owl carousel responsive 1170px div width issue猫头鹰轮播响应 1170px div 宽度问题
【发布时间】:2017-12-13 07:44:18
【问题描述】:

当我的显示尺寸在小于 1170px owl carousel div width 时溢出。我在做什么?

    jQuery(document).ready(function($) {
    "use strict";
    //  TESTIMONIALS CAROUSEL HOOK
    $('#customers-testimonials').owlCarousel({
        loop: true,
        center: true,
        items: 3,
        margin: 0,
        autoplay: true,
        dots:false,
        autoplayTimeout: 8500,
        smartSpeed: 450,
        responsive: {
          0: {
            items: 1
          },
          768: {
            items: 2
          },
          1170: {
            items: 3,
            nav:true
          }
        }
    });
});

【问题讨论】:

  • 可能是nav:true引起的,假的再试一次。

标签: javascript jquery html css ajax


【解决方案1】:

试试这个! autoWidth true 或者你修改css! 在js中

$('.owl-carousel').owlCarousel({
    margin:10,
    loop:true,
    autoWidth:true,
    items:4
})

或在css中

@media screen and (min-width: 480px) {
    body {
        background-color: lightgreen;
    }
}

【讨论】:

    猜你喜欢
    • 2015-12-04
    • 1970-01-01
    • 1970-01-01
    • 2014-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多