为什么我的按钮在浏览器窗口崩溃时不想工作?我的意思是一旦点击汉堡菜单按钮,就不会出现菜单。
这是我的 HTML :
<html>
<head>
</head>
<body>
<!-- Navbar style available in Bootstrap framework-->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- /end-->
<!-- Anything that has to be responsive we are going to keep inside the Bootstrap grid -->
<div class="container">
<!-- /end -->
<div class="navbar-header">
<button type="button" class="navbar-toggle btn-lg" data-toggle="collapse" data-target=".navbar-collapse" id="btnnavbar">
<!-- For screen readers only -->
<span class="sr-only">Toggle navigation</span>
<!-- /end -->
<!-- Hamburger menu button appears when browser window has been shrinked -->
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- /end -->
<!-- Brand and toggle get grouped for better mobile display -->
<a class="navbar-brand" href="http://codepen.io/ekilja01"><img id="imgbrand" src="http://www.kiljakandweb.com/favicon.png" alt="brand logo"></a>
</div>
我想在此之前每个人都很好
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active" id="btnhome"><a href="#">About</a></li>
<li id="btnhome"><a href="#">Portfolio</a></li>
<li id="btnhome"><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>