twitter-bootstrap 如何禁用引导轮播动画?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18760225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to disable bootstrap carousel animation?
提问by IgorCh
For example I have carousel with 3 images, when the carousel slides the new images are added via 'slid' event
例如,我有 3 张图像的轮播,当轮播滑动时,新图像是通过 'slid' 事件添加的
$('#imageCarousel').on('slid', function (event) {
//add more images
});
I want to disable animation for the carousel, so transition time is set to 0 in carousel css as it was shown here removing carousel animation. But after that 'slid' event does not fire. I cannot use 'slide' event, because I need to know which item is active in the carousel, but the 'active' class is not set up after the 'slide' event. How can I solve it? Thanks.
我想禁用旋转木马的动画,因此在旋转木马 css 中将过渡时间设置为 0,如此处所示删除旋转木马动画。但在那之后“滑动”事件不会触发。我不能使用 'slide' 事件,因为我需要知道哪个项目在轮播中处于活动状态,但是在 'slide' 事件之后没有设置 'active' 类。我该如何解决?谢谢。

