警告框的学习:
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE-edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Bootstrap 101 Template</title>
<link href="http://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="http://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="bs-example">
<div class="alert alert-success" role="alert">
<!-- strong是加强 -->
<strong>well done!</strong>You Successfully do this
</div>
<div class="alert alert-info" role="alert">
<strong>Heads up</strong>It needs your attention
</div>
<div class="alert alert-warning" role="alert">
<strong>Warning!</strong>Better check yourself
</div>
<div class="alert alert-danger" role="alert">
<strong>On snap!</strong>Change a few things up
</div>
</div>
<!-- 带×的警告栏 -->
<div class="alert alert-danger alert-dismissible" role="alert">
<button ype="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button>
<strong>On snap!</strong>Change a few things up
</div>
<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.1/js/npm.js"></script>
</body>
</html>
结果: