nav https://v3.bootcss.com/components/#navbar
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <title></title> 8 <!-- 引入Bootstrap核心样式文件(必须) --> 9 <link rel="stylesheet" href="../college/lib/bootstrap/css/bootstrap.css"> 10 </head> 11 <body> 12 13 <nav class="navbar navbar-default navbar-inverse navbar-fixed-bottom"> 14 <div class="container"> 15 <!-- Brand and toggle get grouped for better mobile display --> 16 <div class="navbar-header"> 17 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> 18 <span class="sr-only">Toggle navigation</span> 19 <span class="icon-bar"></span> 20 <span class="icon-bar"></span> 21 <span class="icon-bar"></span> 22 </button> 23 <a class="navbar-brand" href="#">哈哈哈哈</a> 24 </div> 25 26 <!-- Collect the nav links, forms, and other content for toggling --> 27 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 28 <ul class="nav navbar-nav"> 29 <li class="active"><a href="#">上海 <span class="sr-only">(current)</span></a></li> 30 <li><a href="#">北京</a></li> 31 <li class="dropdown"> 32 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">美国 <span class="caret"></span></a> 33 <ul class="dropdown-menu"> 34 <li><a href="#">而过</a></li> 35 <li><a href="#">Another action</a></li> 36 <li><a href="#">Something else here</a></li> 37 <li role="separator" class="divider"></li> 38 <li><a href="#">Separated link</a></li> 39 <li role="separator" class="divider"></li> 40 <li><a href="#">One more separated link</a></li> 41 </ul> 42 </li> 43 </ul> 44 <!-- <form class="navbar-form navbar-left"> 45 <div class="form-group"> 46 <input type="text" class="form-control" placeholder="Search"> 47 </div> 48 <button type="submit" class="btn btn-default">Submit</button> 49 </form>--> 50 <ul class="nav navbar-nav navbar-right"> 51 <li><a href="#">Link</a></li> 52 <!--<li class="dropdown"> 53 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> 54 <ul class="dropdown-menu"> 55 <li><a href="#">Action</a></li> 56 <li><a href="#">Another action</a></li> 57 <li><a href="#">Something else here</a></li> 58 <li role="separator" class="divider"></li> 59 <li><a href="#">Separated link</a></li> 60 </ul> 61 </li>--> 62 </ul> 63 </div><!-- /.navbar-collapse --> 64 </div><!-- /.container-fluid --> 65 </nav> 66 67 68 <script src="../college/lib/jquery/jquery.js"></script> 69 <!-- 引入所有的Bootstrap的JS插件 --> 70 <script src="../college/lib/bootstrap/js/bootstrap.js"></script> 71 </body> 72 </html>