我正在尝试使用jquery 1.11.0和bootstrap 3.3.1在一个网站中修复有关下拉菜单的问题。
我做错了什么?
<nav class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<button type="button" id="nav-toggle" class="navbar-toggle" data-toggle="collapse" data-target="#main-nav">
<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="main-nav" class="collapse navbar-collapse navStyle">
<ul class="nav navbar-nav" id="mainNav">
<li class="active"><a href="#home" class="scroll-link">Home</a></li>
<li><a href="#menu01" class="scroll-link">menu 01</a></li>
<li><a href="#menu02" class="scroll-link">menu 02</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">O que fazemos<b class="caret"></b></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#oqueFazemos">submenu 01</a></li>
<li><a href="#oqueFazemos">submenu 02</a></li>
<li><a href="#oqueFazemos">submenu 03</a></li>
</ul>
</li>
<li><a href="#menu03" class="scroll-link">Menu 03</a></li>
<li><a href="#menu04" class="scroll-link">Menu 04</a></li>
</ul>
</div>
</nav>
答案 0 :(得分:0)
您在菜单项02处错过了</li>
。我修复了它并缩进,并且OqueFrazemos的下拉列表在Chrome中正常工作。
答案 1 :(得分:0)
解决。问题是css显示:缺少内联块:)