gpt4 book ai didi

javascript - 猫头鹰轮播响应 1170px div 宽度问题

转载 作者:行者123 更新时间:2023-11-28 02:29:18 30 4
gpt4 key购买 nike

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

enter image description here

    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
}
}
});
});

最佳答案

试试这个! 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;
}
}

关于javascript - 猫头鹰轮播响应 1170px div 宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47787881/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com