如何将bootstrap toogle菜单设置为默认菜单?

时间:2015-06-06 17:29:07

标签: twitter-bootstrap twitter-bootstrap-3

我有一个网站,我试图将bootstrap toogle菜单设置为默认,因为很多热门网站现在都使用这个。始终显示toogle菜单。甚至是普罗普普的观点 这是我的代码,提前谢谢。                                                                                                                                                                                                  切换导航                                                                                                                                                                                                         牌                                     

                                <!-- Collect the nav links, forms, and other content for toggling -->
                                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                  <ul class="nav navbar-nav">
                                    <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
                                    <li><a href="#">Link</a></li>
                                    <li><a href="#">Link</a></li>
                                    <li><a href="#">Link</a></li>
                                  </ul>
                                </div><!-- /.navbar-collapse -->
                              </div><!-- /.container-fluid -->
                            </nav>`

1 个答案:

答案 0 :(得分:0)

Hi be sure to close your <nav></nav> divs. 
    Replace your code with the following 
    <nav class="navbar navbar-default">
      <div class="container-fluid"> 
       <div class="navbar-header">
         <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    ...
    </button> cont here [http://www.bootply.com/pSq7nXLcfc][1]


      [1]: http://www.bootply.com/pSq7nXLcfc