Bootstrap Nav菜单切换按钮不起作用

时间:2016-01-06 17:22:51

标签: html twitter-bootstrap menu toggle nav

我有以下导航菜单,但点击它时切换按钮不起作用。它保持关闭,我希望它在有一个较小的屏幕时打开和关闭。有没有办法解决这个问题?谢谢你的帮助。

<nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar collapse">
                    <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" rel="home" href="#main" title="The Dessert Corner">
                    <img style="max-width:150px; margin-top: -7px;" src="Images/logo2.jpg">
                </a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a href="#main">Home</a></li>
                    <li><a href="#aboutus">About Us</a></li>
                    <li><a href="#promos">Promos Section</a></li>
                    <li><a href="#members">Member's List</a></li>
                    <li><a href="#memberlogged">Member Logged</a></li>
                    <li><a href="#contact">Contact Us</a></li>
                </ul>
            </div>
        </div>
    <nav>

0 个答案:

没有答案