问答详情
源自:3-1 导航及下拉菜单制作

为啥我的导航条在小窗口下默认是展开的,代码如下

    <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
        <div class="container">
            <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 href="#" class="navbar-brand">现代浏览器博物馆</a>
            </div>
            <div class="cpllapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">综述</a></li>
                    <li><a href="#">简述</a></li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">描述<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">Chrome</a></li>
                            <li><a href="#">FireFox</a></li>
                            <li><a href="#">Opera</a></li>
                            <li class="divider"></li>
                            <li><a href="#">IE</a></li>
                        </ul>
                    </li>
                    <li><a href="#">关于</a></li>
                </ul>
            </div>
        </div>
    </nav>


提问者:冷寒轩111 2018-03-23 22:52

个回答

  • 冷寒轩111
    2018-03-23 22:55:29

    没事了,解决了