如何始终在浏览器中显示垂直滚动条? [英] How to always show the vertical scrollbar in a browser?
本文介绍了如何始终在浏览器中显示垂直滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想始终在我的网页中显示垂直滚动条.是否可以使用javascript?我认为可以使用 javascript 或 jQuery.我想要垂直滚动条是否有足够的内容显示.
I want to always show vertical scrollbar in my webpage. Is it possible using javascript? I think it is possible using javascript or jQuery. I want vertical scrollbar whether there is enough content to show or not.
谢谢.
推荐答案
jQuery 不应该是必需的.您可以尝试添加 CSS:
jQuery shouldn't be required. You could try adding the CSS:
body {overflow-y:scroll;}
这适用于最新的浏览器,甚至 IE6.
This works across the latest browsers, even IE6.
这篇关于如何始终在浏览器中显示垂直滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文