【发布时间】:2016-03-22 02:23:21
【问题描述】:
你好,我使用光滑的滑块,只想显示 3 张图片
但它在两边留下了一半的图像
<div class="review-company">
div><img src="http://placehold.it/350x350"></div>
<div><img src="http://placehold.it/350x350"></div>
<div><img src="http://placehold.it/350x350"></div>
<div><img src="http://placehold.it/350x350"></div>
<div><img src="http://placehold.it/350x350"></div>
</div><!-- Review-company -->
$('.review-company').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 3,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 3
}
},
{
breakpoint: 480,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1
}
}
]
});
如何让它只显示3个左右空白的图像?
【问题讨论】:
-
使用
centerMode可以做到这一点。一定要用centerMode吗? -
是的,先生,我已经用过了
-
我在问你是否需要使用
centerMode。如果您将其设置为false,您将看不到部分幻灯片。 -
与您一起修复。谢谢先生啊,我不能放弃我竖起大拇指