当滚动条出现时如何停止向左移动Bootstrap 3.1.1? [英] How to stop Bootstrap 3.1.1 from shift content left when scroll bar appears?
本文介绍了当滚动条出现时如何停止向左移动Bootstrap 3.1.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是Bootstrap 3.1.1,当我的页面由于内容过多而需要垂直滚动条时,Bootstrap会将html正文移至-15px以上,以为垂直滚动条腾出空间。对于Bootstrap模态来说,这是一个大问题,但我相信它已在3.0.1中修复。
I'm using Bootstrap 3.1.1 and when I have a page that requires a vertical scroll bar due to a lot of content, Bootstrap shifts the html body over -15px to made room for the vertical scroll bar. This was a big issue for Bootstrap modals but it was fixed in 3.0.1 I believe.
有什么想法,技巧或技巧可以避免此问题?
Any ideas, tricks, or hacks to avoid this problem?
推荐答案
使滚动条始终可见,因此从长页面返回时没有视觉跳转。
Make the scroll-bar always visible, so there is no visual jump when going from long pages and back.
CSS:
html {
overflow-y: scroll;
}
这篇关于当滚动条出现时如何停止向左移动Bootstrap 3.1.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文