twitter-bootstrap - 为什么这个 Bootstrap 3.0 模态演示中会出现第二个垂直滚动条?

标签 twitter-bootstrap modal-dialog

在此 Bootstrap 3.0 (WIP) 页面上向下滚动到“启动演示模式”。

http://bs3.codersgrid.com/javascript/#modals

请注意出现第二个垂直滚动条。为什么?

最佳答案

由于 CSS 样式被应用于元素:

.modal {
    bottom: 0;
    display: none;
    left: 0;
    overflow-x: auto;
    overflow-y: scroll; /* <--- this guy right here */
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1040;
}

将溢出属性显式设置为 scroll无论是否溢出,都会导致浏览器显示滚动条。

关于twitter-bootstrap - 为什么这个 Bootstrap 3.0 模态演示中会出现第二个垂直滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17666543/

相关文章:

html - 如何使用不同于细节图像的缩略图

html - 删除 Bootstrap 4 行列中的等高

html - highlight.js 和 Bootstrap 的问题

c# - 通知模态表单的父级它需要采取一些行动

html - Bootstrap 3.3 在模态上显示双滚动条

internet-explorer - 无法在 IE11 中输入文本字段

html - 在固定导航栏下滚动时降低内容的不透明度

javascript - 模态关闭按钮不起作用

Angular 2 innerHTML忽略表单标签

javascript - 位置 :fixed difference in IE Vs Firefox