<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Bootstrap</title> <meta name="description" content=""> <meta name="keywords" content=""> <!-- 设置自适应设备 width=device-width宽度为设备宽度 initial-scale=1缩放比例设置为当前不缩放 --> <meta name="viewport" content="width=device-width , initial-scale=1, user-scalable=no"> <script src="./bootstrap/js/bootstrap.min.js" ></script> <script src="./bootstrap/js/jquery.js"></script> <link rel="stylesheet" href="./bootstrap/css/bootstrap.css"> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <a href="#" class="navbar-brand">天涯alone</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Cantent</a></li> </ul> </div> </div> </nav> </body> </html>
效果如下: