我对 Bootstrap 最新版本中的响应式导航栏没有任何问题,但我无法让版本 3 工作。切换按钮正确显示,一切都消失了,但品牌,但按钮不响应点击。(http://getbootstrap.com/components/#navbar-responsive)任何帮助将不胜感激!这是到目前为止的代码:
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Hello World</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="js/bootstrap.min.js"></script>
<link href="css/bootstrap.css" rel="stylesheet" media="screen">
</head>
<body>
<section>
<div class="navbar navbar-fixed-top">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href= "#" class="navbar-brand">Brand Name</a>
<div class="nav-collapse navbar-responsive-collapse collapse">
<ul class="nav navbar-nav pull-right">
<li class="active "><a href="#">Home</a></li>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>
</div>
</div>
</section>