浏览器宽度缩小到一定值时,导航显示为
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!--折叠显示图标-->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#a">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">tinyphp</a>
</div> <!--导航折叠-->
<div class="collapse navbar-collapse" id="a">
<ul class="nav navbar-nav">
<li class="active">
<a href="#">Home</a>
</li>
<li class="dropdown">
<a href="#" class="btn dropdown-toggle" data-toggle="dropdown" >Address <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div>
</div> </nav>
详情:http://v3.bootcss.com/components/#navbar