实际上我正在使用Bootstrap 3,在我的网络中我有两个菜单。当我检查响应式设计时,它为我提供了两个菜单的按钮,但是当我点击enyone时它只打开第一个菜单。所以我不知道如何只有一个按钮,两个菜单都显示在小屏幕的同一个div中。
任何人都可以帮助我吗?
答案 0 :(得分:0)
The firstone:
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right menu1">
<li><a href="#">Register</a></li>
<li><a href="#">Login<span class="sr-only">(current)</span></a></li>
<li><a href="#">Wishlist <span class="badge pull-right">(0)</span></a></li>
<li><a href="#"><span class="glyphicon glyphicon-shopping-cart"></span> Shoping cart <span class="badge pull-right">(0)</span></a></li>
</ul>
</div>
</div>
</nav>
the seconone:
<div class="col-md-pull-9">
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-right menu2">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#">Strona Główna</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Kategorie <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Bestselery</a></li>
<li><a href="#">Biografie</a></li>
<li><a href="#">Encyklopedie</a></li>
<li><a href="#">Fantastyka</a></li>
<li><a href="#">Historia</a></li>
<li><a href="#">Kuchnia i diety</a></li>
<li><a href="#">Literatura</a></li>
<li><a href="#">Nauka języków</a></li>
</ul>
</li>
<li><a href="#">Nowości</a></li>
<li><a href="#">Bestsellery</a></li>
<li><a href="#">Ebooki</a></li>
<li><a href="#">Kontakt</a></li>
<li><a href="#">About us</a></li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
</div>
这是我的代码