如何防止崩溃bootstrap-3菜单

时间:2016-01-06 18:00:50

标签: jquery css twitter-bootstrap

请帮忙 我不需要在移动设备上折叠菜单 如何防止崩溃bootstrap-3菜单? 我试图找到一个解决方案,但没有找到

<nav class="navbar navbar-default navbar-static-top">           
            <div class="navbar-header">
              <button data-target="#bs-example-navbar-collapse-6" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>               
            </div>
    <div id="bs-example-navbar-collapse-6" class="collapse navbar-collapse">                  
        <ul class="nav navbar-nav navbar-right" style='margin-right:10px;'>         
            <li><a href='/add-your-car'><img style="height:25px; opacity:0.8;" src="/img/carcash.png"><br><?=MENU_1;?></a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img src="/img/about.png"><br><?=MENU_2;?><span class="caret"></span></a>                
            </li>
            <li><a href="#" onclick='return false;' data-toggle="modal" data-target="#myModalLogin"><img src="/img/login.png"><br><?=MENU_3;?></a></li>
            <li><a id='reguser' onclick='return false;' href="#" data-toggle="modal" data-target="#myModalAuth"><img src="/img/regg.png"><br><?=MENU_4;?></a></li>
            <li>
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img src="/img/lang<?=$global_locale;?>.png"><br><?=MENU_10;?><span class="caret"></span></a>                
            </li>
         </ul>                
    </div>           
     </nav>

1 个答案:

答案 0 :(得分:0)

将此代码添加到您的css文件中:

.navbar-collapse.collapse {
    display: block!important;
}
.navbar-nav>li, .navbar-nav {
    float: left !important;
}
.navbar-right {
    float: right!important;
}
.navbar-toggle {
    display: none;
}

Forth类从移动设备中删除汉堡按钮。

找到答案here on SO