twitter-bootstrap Bootstrap 下拉菜单:删除滚动条
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31291034/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap DropDown Menu: Remove Scrollbar
提问by HaeNaatch
I'm working in following GitHub-Repo.
我正在关注GitHub-Repo。
When the window width decreases,the navbar collapses and changes to a dropdown menu with scrollbars (for width and heigth).
当窗口宽度减小时,导航栏会折叠并变为带有滚动条(用于宽度和高度)的下拉菜单。
How can I remove those scrollbars?
如何删除这些滚动条?
I tried adding
我尝试添加
.navbar-collapse{
max-height:auto;
max-widht:auto;
}
to my css file which handles the collapsing size.
到我处理折叠大小的 css 文件。
回答by Cristi Draghici
Another solution is adding the following to your CSS:
另一种解决方案是将以下内容添加到您的 CSS:
/* No scrolling for collapsed menu */
.navbar-collapse.in {
overflow: hidden;
max-height: none !important;
height: auto !important;
}
回答by Cris in Motion
Try this
试试这个
.navbar-collapse {
max-height:100%;
}

