光滑的旋转木马从右到左 [英] Slick carousel right to left
本文介绍了光滑的旋转木马从右到左的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经设置了光滑的转盘以连续滚动,但是我需要在相反的方向滚动.添加RTL选项似乎无效.
I've setup slick carousel to continuously scroll, however I need to to scroll in the oposite direction. Adding the RTL option didn't seem to work.
在这里摆弄(当前从左到右)
Fiddle here (currently left to right)
http://jsfiddle.net/mth2ghod/
$(function(){
$('.slider').slick({
speed: 10000,
autoplay: true,
autoplaySpeed: 100,
cssEase: 'linear',
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true
});
});
推荐答案
将slidesToScroll更改为-1(它将更改幻灯片方向)
Change the slidesToScroll to a -1 (it will change the slide direction)
$(function(){
$('.slider').slick({
speed: 10000,
autoplay: true,
autoplaySpeed: 100,
cssEase: 'linear',
slidesToShow: 1,
slidesToScroll: -1,
variableWidth: true
});
});
这篇关于光滑的旋转木马从右到左的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文