我使用Twitter Bootsrap 3和navbar-collapse:
http://bootply.com/91119
解决方法
您可以减少导航栏折叠的点.
选项1
来自Bootstrap文档(http://getbootstrap.com/components/#navbar)
Depending on the content in your navbar,you might need to change the point at which your navbar switches between collapsed and horizontal mode. Customize the @grid-float-breakpoint variable or add your own media query.
选项2
如果您不想要自定义Bootstrap构建,则可以使用CSS媒体查询.例如,这里设置断点为1280像素:
@media (max-width: 1280px) { .navbar-header { float: none; } .navbar-toggle { display: block; } .navbar-collapse { border-top: 1px solid transparent; Box-shadow: inset 0 1px 0 rgba(255,255,0.1); } .navbar-collapse.collapse { display: none!important; } .navbar-nav { float: none!important; margin: 7.5px -15px; } .navbar-nav>li { float: none; } .navbar-nav>li>a { padding-top: 10px; padding-bottom: 10px; } }
Bootstrap 3.1的更新
3.1中的导航栏已更改,因此覆盖断点的CSS不同于3.0.这将阻止导航栏显示然后在3.1中突然崩溃
http://www.bootply.com/120604