bootstrap响应式导航栏点击collapse的按钮没有反应,不会向下展开
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="../" class="navbar-brand">社区</a>
</div>
<div class="navbar-collapse navbar-ex1-collapse collapse" role="navigation">
<ul class="nav navbar-nav">
<li class=""><a href="">论坛</a></li>
<li class=""><a href="">博客</a></li>
</ul>
</div>
</div>
</nav>
代码如上,已经导入bootstrap.css和bootstrap.js文件
akira7
10 years, 3 months ago
Answers
楼上说的对,可以看下bootstap文档, http://v3.bootcss.com/components/#navbar , http://v3.bootcss.com/javascript/#collapse
Enable manually with:
$('.collapse').collapse()
黑zero银
answered 10 years, 3 months ago