Bootstrap DropDown Menu: Remove Scrollbar

筅森魡賤 提交于 2019-12-10 14:52:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!