【响应式Web前端设计】Bootstrap入门Demo(导航栏)
原创
©著作权归作者所有:来自51CTO博客作者李响Superb的原创作品,请联系作者获取转载授权,否则将追究法律责任
文章目录
1 导入bootstrap.min.css
2 效果
3 代码
<!--
作者:88304454@qq.com
时间:2021-03-01
描述:
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>bootstrap</title>
<link rel="stylesheet" href="bootstrap.min.css">
<style>
body{
padding-top: 50px;
}
.stater{
padding: 40px 15px;
text-align: center;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="nabigation">
<div class="container">
<div class="navbar-header">
<a href="#" class="navbar-brand">Project Name</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contect</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="stater">
<h1>lx</h1>
<p class="lead">
lixiang
</p>
</div>
</div>
</body>
</html>