我正在尝试使导航栏可折叠但由于某种原因它会崩溃并且非常快地关闭它自己 这是我的代码:
<div class="navbar navbar-inverse navbar-static-top">
<div class="container">
<a href="#" class="navbar-brand">
<img class="logo" src="../img/logo.png" /></a>
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../Default.aspx">Home</a></li>
<li><a href="../Library/Library.aspx">Library</a></li>
<li><a href="../About.aspx">About</a></li>
<li><a href="#contact" data-toggle="modal">Contact</a></li>
<li>
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
<a href="#login" id="HeadLoginStatus" runat="server" data-toggle="modal">Log In</a>
</AnonymousTemplate>
<LoggedInTemplate>
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation" class="dropdown-header"><asp:LoginName ID="HeadLoginName" runat="server" /></li>
<li><a href="#">Accounts</a></li>
<li><a href="#"><asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/" /></a></li>
</ul>
</li>
</LoggedInTemplate>
</asp:LoginView>
</li>
</ul>
</div>
</div>
</div>
有人可以告诉我它有什么问题吗?
答案 0 :(得分:0)
更改您的&#34;按钮&#34;到了一个&#34; div&#34;标记这将阻止发回帖子。