Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个滑块,一次应该显示 2 张幻灯片,但是当滑动它时,一次只能显示 1 张,这可能吗?我可以让它一次显示 2 个,但它会滑动 2 个,为此我使用了 groupCells 选项。
我有同样的问题,我最终使用了 cellAlign 选项:
<div id="test" class="carousel" data-flickity='{ "cellAlign": "left"}'>
然后将 div 的宽度设置为两张幻灯片的宽度。
您可以添加问题中的代码以帮助更快地解决问题。无论如何,你有没有试过:draggable: '>1'?这似乎是做到这一点的方法。然后只需使用 CSSwidth一次显示 2 个。
draggable: '>1'
width