小亿亿
2017-03-16 15:45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" >
<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="#">Brand</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 class="active"><a href="#">Link </a></li>
<li><a href="#">Link</a> </li>
</ul>
</div><!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</body>
</html>
<h1>你试试看看</h1>
代码没有错误,只是你的少引入一个jquary的脚本
在后面加一个这个
<script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
基于bootstrap的网页开发
187669 学习 · 734 问题
相似问题