请按照以下给定的步骤创建动画进度条:
添加具有.progress和.progress-striped类的<div>。另外,将类.active添加到.progress-striped中。
接下来,在上面的<div>中,添加一个带有.progress-bar类的空的<div>。
添加一个样式属性,其宽度用百分比表示。例如,style =“ 60%”; 表示进度条为60%。
您可以尝试运行以下代码来创建动画进度条-
<!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> <h2>Progress Bar</h2> <h3>Normal Progress Bar</h3> <div class = "progress progress-striped"> <div class = "progress-bar progress-bar-success" role = "progressbar" aria-valuenow = "45" aria-valuemin = "0" aria-valuemax = "100" style = "width: 45%;"> <span class = "sr-only">45%Complete (success)</span> </div> </div> <h3>Animated Progress Bar</h3> <div class = "progress progress-striped active"> <div class = "progress-bar progress-bar-success" role = "progressbar" aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: 40%;"> <span class = "sr-only">40% Complete</span> </div> </div> </body> </html>