<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>//引入
1 <div class="navbar navbar-default navbar-fixed-top"> 2 <div class="container"><!--用container包裹住可以居中--> 3 <div class="navbar-header"> 4 <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> 5 <span class="sr-only">qqq</span> 6 <span class="icon-bar"></span> 7 <span class="icon-bar"></span><!--图标--> 8 <span class="icon-bar"></span><!--sr-only类可以对屏幕阅读器以外的设备隐藏内容--> 9 </button> 10 <a class="navbar-brand" href="#">dzxczx</a> 11 </div> 12 <div class="collapse navbar-collapse navbar-responsive-collapse"> 13 <ul class="nav navbar-nav"> 14 <li><a href="#">1</a></li> 15 <li><a href="#">2</a></li> 16 <li><a href="#">3</a></li> 17 <li><a href="#">4</a></li> 18 </ul> 19 </div> 20 </div> 21 </div>
固定响应式导航就这样写完啦~