bootstrap3 导航栏折叠在 jsfiddle 上工作如下。
https://jsfiddle.net/wa3he6bn/1/
<html>
<header>
<title>title</title>
....
</header>
<body>
<div class="wrap">
<nav id="w1" class="navbar-default navbar-fixed-top navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w1-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 class="navbar-brand" href="/index.php">Logo</a></div>
<div id="w1-collapse" class="collapse navbar-collapse">
<ul id="w2" class="navbar-nav navbar-right nav">
<li><a href="/index.php?r=site%2Findex">主页</a></li>
<li><a href="https://docs.mathcrowd.cn" target="_blank">文档</a></li>
<li><a href="/index.php?r=worksheet%2Ffilter">卷库</a></li>
<li class="help-link"><a href="javascript:void(0);"><span
class="glyphicon glyphicon-question-sign"></span></a></li>
<li><a href="/index.php?r=cart%2Fview"><span class="glyphicon glyphicon-shopping-cart"></span></a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</body>
</html>
但是当保存相同的html并在本地运行时,它不会崩溃。
UYOU
ABOUTYOU
慕容3067478
相关分类