问题
I'm working in following 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.
回答1:
Another solution is adding the following to your CSS:
/* No scrolling for collapsed menu */
.navbar-collapse.in {
overflow: hidden;
max-height: none !important;
height: auto !important;
}
回答2:
Change your css to
.navbar-collapse.in {
overflow: hidden;
}
Demo
回答3:
Try this
.navbar-collapse {
max-height:100%;
}
来源:https://stackoverflow.com/questions/31291034/bootstrap-dropdown-menu-remove-scrollbar