带语境色彩的面板
使用语境状态类 panel-primary、panel-success、panel-info、panel-warning、panel-danger,来设置带语境色彩的面板,实例如下:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Bootstrap历练实例:语境色彩的面板</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
</head>
<body>
<div style="padding:20px">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板的主体内容
</div>
<div class="panel-footer">
面板脚注
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板主体内容
</div>
<div class="panel-footer">
面板脚注
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板的主体
</div>
<div class="panel-footer">
面板的脚注
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板主体
</div>
<div class="panel-footer">
面板脚注
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板主体
</div>
<div class="panel-footer">
面板脚注
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">
<h2 class="panel-title">面板标题</h2>
</div>
<div class="panel-body">
面板主体
</div>
<div class="panel-footer">
面板脚注
</div>
</div>
</div>
<script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
<script src="jQuery/jquery-2.1.4.js"></script>
</body>
</html>