要创建指示警告动作的黄色警报框,请使用警报警告类。
要实现警报警告类,您需要尝试运行以下代码
<!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://cdn.staticfile.org/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>