Bootstrap导航栏始终保持折叠状态

时间:2015-05-20 17:16:50

标签: html twitter-bootstrap navigationbar

我希望我的导航栏始终处于折叠状态。我已经尝试过查看其他示例,但是当我尝试它们时,代码会让它保持折叠状态,但是一旦我点击它,它就会保持打开一秒直到它关闭。我还希望在页面右侧打开导航栏的位置,然后在那里屏蔽网站内容,直到它关闭。有什么想法吗?

 <DOCTYPE html>
    <html>
      <head>
        <title>Home</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!--Bootstrap stylesheets-->
        <link rel="stylesheet" href="/Users/jordan/Desktop/My EAST Website/stylesheets/bootstrap.min.css">
        <!--Main Stylesheets-->
        <link rel="stylesheet" href="/Users/jordan/Desktop/My EAST Website/stylesheets/styles.css">
        <!--js import of bootstrap-->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script src="js/bootstrap.js"></script>

    </head>
    <body>
        <!--Top Navigation Bar-->
<nav class="navbar navbar-inverse always-open">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">Name</a>
        <button type="button" class="navbar-toggle" 
                data-toggle="collapse" data-target=".navbar-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
    </div>
    <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Contact</a></li>
        </ul>
    </div>
</nav>

        <!--end of nav bar-->
    </body>
</html>

0 个答案:

没有答案