HTML CSS examples for Bootstrap Class List:alert-dismissable
alert-dismissable - closable alert message box
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script> </head><!--from w w w . j a v a 2s . c o m--> <body> <div class="container"> <h2>Animated Alerts</h2> <p>The .fade and .show classes adds a fading effect when closing the alert message.</p> <div class="alert alert-success alert-dismissable fade show"> <button type="button" class="close" data-dismiss="alert">&times;</button> <strong>Success!</strong> This alert box could indicate a successful or positive action. </div> </div> </body> </html>