twitter-bootstrap 如何在同一页面上显示多个 Twitter Bootstrap 导航栏?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16486927/
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
How to show multiple Twitter Bootstrap navbar's on the same page?
提问by Devin Goble
Is it possible to show more than one navbar on a given page? I'd like to have an inverted navbar fixed to the top, and then on certain pages have a second fixed navbar right under it as an additional information header.
是否可以在给定页面上显示多个导航栏?我想有一个倒置的导航栏固定在顶部,然后在某些页面上有第二个固定导航栏作为附加信息标题。
采纳答案by Zim
Sure you can have 2 navbars. You may have to tweak the code to get it the way you want...
当然你可以有 2 个导航栏。您可能需要调整代码才能以您想要的方式获得它...
Working Example
工作示例
<div class="navbar navbar-static-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="#">Brand</a>
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">More</a></li>
<li><a href="#">Options</a></li>
</ul>
</div>
</div>
<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div>

