导航条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>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>
    <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container-fluid">
    <!-- 缩放流式布局 -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs">
            <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">
            <img src="img/brand.png">
          </a>
        </div>
    <!-- 导航条 -->
        <div class="collapse navbar-collapse" id="bs">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">home</a></li>
            <li><a href="">link</a></li>
          <!-- 导航条中的下拉菜单选项 -->
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">dropdown
                <span class="caret"></span>
              </a>
                <ul class="dropdown-menu" role="menu">
                  <li><a href="">link1</a></li>
                  <li><a href="">link2</a></li>
                  <li><a href="">link3</a></li>
                  <li class="divider"></li>
                  <li><a href="">link4</a></li>
                  <li class="disabled"><a href="">link5</a></li>
                </ul>
            </li>
          </ul>
        <!-- form框中的输入框和按钮 向左 -->
          <form action="" class="navbar-form navbar-left" role="search">
            <div class="form-group">
              <input type="text" class="form-control" placeholder="search">
            </div>
            <button type="button" class="btn btn-default">submit</button>
          </form>
        <!-- 导航条和导航中的下拉菜单向右 -->
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#">link</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">dropdown
                <span class="caret"></span>
              </a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="">link1</a></li>
                  <li><a href="">link2</a></li>
                  <li><a href="">link3</a></li>
                  <li class="divider"></li>
                  <li><a href="">link4</a></li>
                  <li class="disabled"><a href="">link5</a></li>
              </ul>
            </li>
          </ul>

        </div><!-- collapse navbar-collapse -->
      </div><!-- container-fluid -->
    </nav><!-- nvabar navbar-default -->

    <!-- 巨幕 -->
    <div class="jumbotron">
      <div class="container">
        <h1>hello,world!</h1>
        <p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
        <p><a href="#" class="btn btn-success btn-lg" role="button">leam more</a></p>
      </div>
    </div>
<br>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

 

posted @ 2016-11-20 14:36  米小玉  阅读(167)  评论(0编辑  收藏  举报