我正在使用Slick carousel为我的网站制作轮播。上一张幻灯片已剪切,因此,如果未显示完整,我想使其消失,如该图所示:
我该怎么做?
<div class="wrapper">
<div class="carousel">
<!-- here is a loop -->
<div>
<img src=":img:full:img:">
</div>
<!-- end loop -->
</div>
</div>
$(document).ready(function() {
$('.carousel').slick({
slidesToScroll: 1,
autoplaySpeed: 3000,
variableWidth: true,
infinite: true,
});
});
答案 0 :(得分:0)
参数variableWidth
本身表示您使用的幻灯片具有自动宽度,因此它取决于图像/徽标的宽度。您应该使用相同宽度的徽标,或者使用variableWidth
选项为假。
使用CSS调整不是一个好的选择。 :)