我必须在最小化页面之后制作一些按钮,他可以显示一些按钮并显示这个但是无法显示菜单的原因? 我能解决吗?
<div class="navbar navbar-inverse navbar-static-top">
<div class="container">
<a href="#" class="navbar-brand"> Full and Starving </a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"> Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class= "collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#"> beranda </a></li>
<li><a href="#"> testing </a></li>
<li><a href="#"> coba </a></li>
<li><a href="#"> Test </a></li>
</ul>
</div>
</div>
答案 0 :(得分:0)
你是否首先包含JQuery,因为bootstrap需要JQuery。工作代码:
代码:
<div class="navbar navbar-inverse navbar-static-top">
<div class="container"> <a href="#" class="navbar-brand"> Full and Starving </a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" > <span class="sr-only"> Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="collapse navbar-collapse" >
<ul class="nav navbar-nav navbar-right">
<li><a href="#"> beranda </a>
</li>
<li><a href="#"> testing </a>
</li>
<li><a href="#"> coba </a>
</li>
<li><a href="#"> Test </a>
</li>
</ul>
</div>
</div>