---
title: "How to make an animated alert message box with the help of an Bootstrap?"  
description: "How to make an animated alert message box with the help of an Bootstrap?"  
author: "Ethan Karla"  
published: 2021-07-28  
canonical: https://answers.mindstick.com/qa/93857/how-to-make-an-animated-alert-message-box-with-the-help-of-an-bootstrap  
category: "web application"  
tags: ["web application development", "web development"]  
reading_time: 2 minutes  

---

# How to make an animated alert message box with the help of an Bootstrap?

How to make an [animated alert message box](https://www.mindstick.com/forum/156604/animated-alert-message-box-with-the-help-of-bootstrap) with the help of an [Bootstrap](https://www.mindstick.com/articles/43948/top-free-resources-for-learning-and-perfecting-bootstrap-programming)?

## Answers

### Answer by Ravi Vishwakarma

We can create an [alert](https://yourviews.mindstick.com/view/82755/high-medical-alert-new-variant-of-covid-19-c-1-2) box in two ways. Using animation and normal. if we create the animation on the alert box then give the two classes '.fade' and '.show'. if not create the animation don't use these two classes.

```
.fade   showing animation like fade-in and fade-out smoothly .show   used for showing the elements .hide   used for hiding the elements
```

Example

```
<!DOCTYPE html>
<html lang='en'>
<head>
  <title>Bootstrap Example</title>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js'></script>
  <script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js'></script>
</head>
<body>
<div class='container mt-2'>
  <h2>Animated Alerts</h2>
  <div class='alert alert-danger alert-dismissible fade show'>
    <button type='button' class='close' data-dismiss='alert'>&times;</button>
    <strong>Danger !!! </strong> This is danger alert box with close button and animation<br />
      This alert is close smoothally
  </div>
    <div class='alert alert-danger alert-dismissible'>
    <button type='button' class='close' data-dismiss='alert'>&times;</button>
    <strong>Danger !!! </strong> This is danger alert box with close button
  </div>
</div>
</body>
</html>
```

output

![How to make an animated alert message box with the help of an Bootstrap?](https://answers.mindstick.com/questionanswer/e921654c-7c3a-477c-bc46-a1e9803af748/images/d9be9c37-c554-4a50-bc0a-6a49f69ac6e1.png)

\


---

Original Source: https://answers.mindstick.com/qa/93857/how-to-make-an-animated-alert-message-box-with-the-help-of-an-bootstrap

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
