码迷,mamicode.com
首页 > 其他好文 > 详细

bootstrap制作导航条

时间:2016-05-07 08:54:16      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

bootstrap 导航条摸索了好久,要不就是左边和右边不会水平对齐,要不就是颜色不一样,菜鸟最后终于搞定,直接把代码放这里,以后直接用

<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>
    <nav class="navbar navbar-default" role = "navigation">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">KKK</a>
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="#">首页 <span class="sr-only"></span></a></li>

      </ul>

      <div class="navbar-right">
        <ul class="nav navbar-nav">
        <li><a href="#">haha<span class="sr-only"></span></a></li>
        <li><a href="#">haha<span class="sr-only"></span></a></li>
      </ul>
      </div>
    </div>
  </div>
</nav>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

看一下结果
技术分享

bootstrap制作导航条

标签:

原文地址:http://blog.csdn.net/handsonn/article/details/51330100

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!