html - 使主滚动条始终可见

标签 html css xhtml

当用户访问网页时(当页面没有足够的内容来触发滚动条的激活时),需要什么 CSS 才能使浏览器的垂直滚动条保持可见?

最佳答案

html {
    overflow: -moz-scrollbars-vertical; 
    overflow-y: scroll;
}

这使滚动条始终可见,并且仅在需要时才处于事件状态。

更新:如果上述方法不起作用,则可以使用它。

html {
    overflow-y:scroll;
}

关于html - 使主滚动条始终可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1202425/

相关文章:

html - 如何使用图像 :fixed, z-index 和滚动效果

html - Bootstrap : how to use radio buttons below select as input-group-addon?

javascript - 如何使用 For 循环将选项 html 参数放在单独的父 div 中

css - rgba 背景与 IE 过滤器替代 : IE9 renders both!

javascript - 元素 = $(元素);对象预期错误?

php - 为 WordPress、Joomla 或 Drupal 等 CMS 制作可安装模板是否需要具备丰富的 PHP 知识?

javascript - 使用 rotateY(或 X)还原 div 后更改图像

html - timepicker 值不会在顶部弹出

css - 谷歌自定义搜索推到框外 Bootstrap IE

css - 背景图像 :url not showing up image for background using css