我有一个基本的Bootstrap 3响应式导航,如下所示:
<body data-spy="scroll" data-offset="0" data-target="#navbar-main">
<div id="navbar-main">
<!-- Fixed navbar -->
<div class="navbar navbar-custom navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span
class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button>
<a class="navbar-brand" href="#"><strong>brand</strong></a></div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Homepage</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">page-1</a>
<ul class="dropdown-menu">
<li><a href="#">page-1-1</a></li>
<li><a href="#">page-1-2</a></li>
</ul>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
</body>
当我在折叠模式下点击下拉菜单按钮时,导航栏正在关闭,我看不到下拉菜单。
它应该打开第1页下方的下拉菜单,但是当我点击Page-1时它会关闭导航。我该如何解决这个问题?