警告框分2种:
静态警告框
动态警告框(依赖jquery插件)
需引入bootstrap下的alert.js到页面中。
静态弹出框
<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><strong>Warning!</strong> success!
</div>
<div class="alert alert-info"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><strong>Warning!</strong> info!
</div>
<div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><strong>Warning!</strong> warning!
</div>
<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><strong>Warning!</strong> danger!
</div>
<div class="alert alert-success"><!-- 关闭x --><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><!-- 弹出框中的文字 --><strong>Well Done!</strong> 请点击:<!-- 链接 --> <a href="http://www.google.com.hk" class="alert-link">领奖</a>
</div>