Animate a striped progress bar in Bootstrap


To animate a striped progress bar, use the .active class with the .progress-bar class in Bootstrap.

You can try to run the following code to animate a striped progress bar

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class="container">
         <h2>Level</h2>
         <p>The level of water in meters:</p>
         <div class = "progress">
            <div class = "progress-bar progress-bar-striped active" role = "progressbar" aria-valuenow = "20" aria-valuemin = "0" aria-valuemax = "100" style = "width:40%">
               20%
            </div>
         </div>
      </div>
   </body>
</html>

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 12-Jun-2020

321 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements