使用 Bootstrap 让条纹进度条动起来
要为条纹进度条添加动画效果,请在 Bootstrap 中将 .active 类与 .progress-bar 类结合使用。
你可以尝试运行以下代码,为条纹进度条添加动画效果
示例
<!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>
广告