再次单击bootstrap折叠菜单不会重新折叠菜单

时间:2014-11-20 12:35:33

标签: html css twitter-bootstrap

当我的网页显示在小型设备上时,菜单会按预期折叠,当您单击折叠的菜单图标时,会再次按预期显示下拉菜单。但是,当您再次单击该图标时,菜单不会按原样折叠。

My Bootstrap代码如下所示:



#myNavbar {
    position: relative;
    border:none;
}
#myNavbar .nav {
    bottom: 0; 
    right: 0;
    margin-bottom: -10px;
}
.navbar-nav.navbar-right:last-child {
    margin-right: 0;
}
.navbar-default {
    background:#FFFFFF;
    border-left:none;
    border-right:none;
    border-top:none;
    border-bottom:solid;
    border-bottom-width:2px;
    border-color:#01B6AC;
    width:100% !important;
    margin-right:0px;
    padding-right:0px;
    border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}
	

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
           <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
           </button>
         <a class="navbar-brand" href="#"><img class="img-responsive" src="/assets/img/outa.png" width="120px;"/></a>
        </div>
        <div class="collapse navbar-collapse" id="myNavbar">
          <ul class="nav navbar-nav pull-right">
              <li><a href="/browser/saved/">Saved searches</a></li>
              <li><a href="../index.html">Settings</a></li>
              <li><a href="../index.html">About</a></li>
              <li><a href="../index.html">Sign In</a></li>
          </ul>
        </div>
    </div>     
</nav>
&#13;
&#13;
&#13;

任何人都知道我做错了什么?

0 个答案:

没有答案