淘先锋技术网

首页 1 2 3 4 5 6 7

.alert——指明div元素为警告框组件;

.alert-info、.alert-danger、.alert-warning、.alert-success——给警告框设置情景效果;

.alert-dismissible——提示该警告框组件为可关闭的;

.close——设置按钮为可关闭;

.alert-link——可以为链接设置与当前警告框相符的颜色;

<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>组件_警告框</title>
    <link rel="stylesheet" href="bootstrap.min.css" target="_blank" rel="external nofollow"  type="text/css">
    <!--<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" target="_blank" rel="external nofollow" >-->
    <script src="jquery-1.11.1.min.js"></script>
    <script src="bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <h3>警告框示例</h3>
    <div class="alert alert-danger" role="alert">
        国安掉队了
    </div>
    <div class="alert alert-info" role="alert">
        恒大仍是冠军的最有力争夺者
    </div>
    <div class="alert alert-success" role="alert">
        上港再次回到榜首位置
    </div>
    <div class="alert alert-warning" role="alert">
        鲁能的状态总是起起伏伏
    </div>

    <div class="alert alert-info alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="close">
            <span aria-disabled="true">×</span>
        </button>
        <strong>感谢您选择<要投哪></strong>
    </div>

    <div class="alert alert-success" role="alert">
        如果你想投资理财,请访问
        <a href="http://www.1touna.com" target="_blank" rel="external nofollow"  class="alert-link" target="_blank">要投哪</a>
    </div>
</div>

</body>
</html>