在 Bootstrap 中创建一个指示警示的黄色警报框
要创建一个黄色警报框指示警告操作,使用 alert-warning 类。
要实现 alert-warning 类,你需要尝试运行以下代码
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> </head> <body> <div class = "alert alert-info"> <p>Indicates a positive action!</p> </div> <div class = "alert alert-warning"> <p>Indicates warning!</p> </div> </body> </html>
广告