BootStrap制作導航條實例代碼

字號:


    Bootstrap 是一個用于快速開發(fā) Web 應用程序和網站的前端框架。本文給大家介紹BootStrap制作導航條實例代碼,感興趣的朋友一起學習吧
    什么是 Bootstrap?
    Bootstrap 是一個用于快速開發(fā) Web 應用程序和網站的前端框架。Bootstrap 是基于 HTML、CSS、JAVASCRIPT 的。
    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 role = "navigation">
    <div>
    <!-- Brand and toggle get grouped for better mobile display -->
    <div>
    <button type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    <span>Toggle navigation</span>
    <span></span>
    <span></span>
    <span></span>
    </button>
    <a href="#">KKK</a>
    </div>
    <div id="bs-example-navbar-collapse-1">
    <ul>
    <li><a href="#">首頁 <span></span></a></li>
    </ul>
    <div>
    <ul>
    <li><a href="#">haha<span></span></a></li>
    <li><a href="#">haha<span></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制作導航條實例代碼,希望對大家有所幫助!