我知道这个问题在另一篇文章中有所涉及,但由于我有一个下拉子菜单,他的修复对我不起作用。是否只是为了让菜单在两者之间切换时崩溃,所以滚动条不会出现?
使用了子菜单
[http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3][1]
修复累了
这是3.0.2中的已知问题 (https://github.com/twbs/bootstrap/issues/11243)
解决方法:
.navbar-collapse.in { 溢出y:可见;演示:http://bootply.com/96924
斯凯利 Restoring expanded responsive navbar menu creates scrollbar in Bootstrap 3.0.2
我的CSS菜单
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
<div class="container">
<div class="navbar-header" >
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Chesapeake Controls Inc.</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div style="display: inline-block;" class="pull-right">
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Capabilities<b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu"><a href="#">Building Automation Systems</a>
<ul class="dropdown-menu">
<li><a href="#">Products</a> </li>
<li><a href="#">Services</a> </li>
</ul>
</li>
<li class="dropdown-submenu"><a href="#">HVAC Service</a>
<ul class="dropdown-menu">
<li><a href="#">Maintenance</a> </li>
<li><a href="#">Installation</a> </li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Projects<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Building Automation</a></li>
<li><a href="#">HVAC</a></li>
</ul>
</li>
<li><a href="#contact">Careers</a></li>
<li><a href="#">Contact Us</a></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Login<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Customer Portal</a></li>
<li><a href="#">PPS Maintenance</a></li>
<li class="divider"></li>
<li><a href="#">File Server</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</div>
</nav>