2017-01-15 125 views
0

我的自舉導航欄中的切換用於工作,但現在已停止切換,並且當我減小屏幕大小時不會顯示菜單。我使用的代碼是:Bootstrap導航欄菜單切換不起作用

</head> 
<body> 
<div class="container-fluid" id="wrapper"> 
<nav class="navbar navbar-default"> 
<div class="container"> 
<!-- Brand and toggle get grouped for better mobile display --> 
<div class="navbar-header"> 
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#defaultNavbar2" aria-expanded="false"> 
<span class="sr-only">Toggle navigation</span> 
<span class="icon-bar"></span> 
<span class="icon-bar"></span><span class="icon-bar"></span></button> 
<img src="images/logo.png" id="navbarlogo"></div> 

<!-- Collect the nav links, forms, and other content for toggling --> 

<div class="collapse navbar-collapse" id="defaultNavbar2"> 
<ul class="nav navbar-nav"> 
<li class="active"></li> 
<li></li> 
<li class="dropdown"> 
<ul class="dropdown-menu"> 
<li><a href="#Kontakt">Kontakt</a></li> 

</ul> 
</li> 
</ul> 
<ul class="nav navbar-nav navbar-right"> 
<li><a href="#Über">Über uns</a></li> 
<li><a href="#Services">Services</a></li> 
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Kontakt<span class="caret"></span></a> 
<ul class="dropdown-menu"> 
<li><a href="#Adresse">Adresse</a></li> 
<li><a href="impressum.html">Impressum</a></li> 

</ul> 
</li> 
</ul> 
</div> 
<!-- /.navbar-collapse --> 

任何想法發生了什麼?謝謝!

回答

0

我應該先檢查一下我的支持文件(css和js)。 navbar需要javascript才能正常工作。