Twitter Bootstrap - 轮播过渡不平滑 [英] Twitter Bootstrap - Carousel Transition is NOT Smooth

查看:32
本文介绍了Twitter Bootstrap - 轮播过渡不平滑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

StackOverflow,

StackOverflow,

我让推特轮播开始工作,但过渡到下一张幻灯片非常艰难.

I got the twitter carousel to work, but the transition to the next slide is very rough.

它平稳地移动,并在最后一秒向下移动并卡入到位.

It moves in smoothly and at the last second, moves down and snaps into position.

这里是屏幕截图供参考:

提前致谢!

推荐答案

我发现轮播不能很好地使用填充.如果您无法避免使用填充(因为我无法避免),请尝试使用顶部"、左侧"、右侧"分别定位轮播的 .next 和 .prev 元素,以便调整到哪一侧以抵消偏移.

I found the carousel doesn't play nicely with padding. If you can't avoid using padding (as I couldn't), try to position the .next and .prev elements of the carousel using 'top', 'left', 'right' respective to which side you're adjusting so as to offset the shift.

您可能需要通过重新加载来反复修改它,以查看它还有多少需要调整.

You may have to tinker with it repeatedly through reloading to see how much more it needs to be adjusted.

例如,要偏移 carousel-inner 元素中的 40px 填充以及左右对齐的元素之间的其他填充,我使用了:

For example, to offset a 40px padding in the carousel-inner element and other padding among the elements aligned left and right, I used:

.carousel .next {
  top: 40px;
  padding-left: 160px;
}

.carousel .prev {
  top: 40px;  
  padding-left: 160px;  
}

希望能帮到你.

这篇关于Twitter Bootstrap - 轮播过渡不平滑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆