0
當我向右側添加元素時,我的切換導航不起作用。當我縮放頁面時,頂部右側的菜單不會出現。如果右側沒有物品,則沒有問題。 我的html代碼:Bootstrap切換導航不起作用
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapse"
data-toggle="collapse" data-target="#navbar" aria-expanded="false"
aria-controls="navbar">
<span class="sr-only">Toggle navigation</span> <span
class="icon-bar"></span> <span class="icon-bar"></span> <span
class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><span>Broker</span>tain</a>
</div>
<div id="navbar" class="navbar-collapse collapse"
aria-expanded="false">
<ul class="nav navbar-nav">
<li><a href="#brokerbattle">Brokerbattle</a></li>
<li><a href="#brokerbrain">Brokerbrain</a></li>
<li><a href="#1x2">1x2</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<p class="btn">
<a href="#" class="btn btn-default regist"><span
class="glyphicon glyphicon-user"></span>Registration</a>
</p>
</li>
<li>
<p class="btn">
<a href="#" class="btn btn-default login"><span
class="glyphicon glyphicon-user"></span>Login</a>
</p>
</li>
</ul>
<form class="navbar-form navbar-right">
<input type="text" class="form-control"
placeholder="Search brokertain...">
</form>
</div>
<!--/.nav-collapse -->
</div>
</nav>
的jsfiddle:enter link description here
導航崩潰是一個javascript函數。你能提供更多的信息嗎?也許把你的JavaScript,CSS和HTML放在一個jsFiddle或一些類似的解決方案,以便任何人試圖幫助看到整個關係。 – Nathan
我在編輯上添加了JSFiddle – aks