简单教程
提交运行
代码编辑器:
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/static/lib/bootstrap/4.0.0/css/bootstrap.min.css"> <script src="/static/lib/jquery/3.3.1/jquery.min.js"></script> <script src="/static/lib/bootstrap/4.0.0/js/bootstrap.min.js"></script> <div class="container"> <h2>多种颜色的进度条</h2> <p>Bootstrap4 提供了以下几种进度条颜色:</p> <div class="progress"> <div class="progress-bar" style="width:30%">默认为蓝色</div> </div> <br> <div class="progress"> <div class="progress-bar bg-success" style="width:40%">.bg-success</div> </div> <br> <div class="progress"> <div class="progress-bar bg-info" style="width:50%">.bg-info</div> </div> <br> <div class="progress"> <div class="progress-bar bg-warning" style="width:60%">.bg-warning</div> </div> <br> <div class="progress"> <div class="progress-bar bg-danger" style="width:70%">.bg-danger</div> </div> </div>
运行结果: