使用 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>
广告