慕粉1420362554
2016-09-17 23:24
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>现代浏览器博物馆</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<style>
body{
padding-top:70px;
}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
<div>
<div>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" >
<span>Toggle navigation</span>
<span></span>
<span></span>
<span></span>
</button>
<a href="#">现代浏览器博物馆</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="#">综述<span>(current)</span></a></li>
<li><a href="#">简述</a></li>
<li>
<a href="#" data-toggle="dropdown" ">特点 <span></span></a>
<ul role="menu">
<li><a href="#">Chrome</a></li>
<li><a href="#">firefox</a></li>
<li><a href="#">Opera</a></li>
<li><a href="#">Safari</a></li>
<li><a href="#">IE</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
<li><a href="#">关于</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<script src="js/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
弄懂了,是js文件写错了,
官方站外文件是<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>,
下载的站内文件JS是<script src="js/jquery-1.11.1.min.js"></script>,
而不是<script src="js/jquery/1.11.1/jquery.min.js"></script>,希望看视频的人不要跟我犯同样的错误()!
基于bootstrap的网页开发
187669 学习 · 734 问题
相似问题