使用 Bootstrap 堆叠多个进度条


如需在 Bootstrap 中堆叠多个进度条,你可以尝试运行以下代码

示例

实时演示

<!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 = "progress">
         <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 (success)</span>
         </div>
         <div class = "progress-bar progress-bar-warning" role = "progressbar"
            aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: 30%;">
            <span class = "sr-only">30% Complete (warning)</span>
         </div>
         <div class = "progress-bar progress-bar-danger" role = "progressbar"
            aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: 20%;">
            <span class = "sr-only">20%Complete (danger)</span>
         </div>
      </div>
   </body>
</html>

更新于:2020 年 6 月 12 日

395 次浏览

开启职业生涯 之旅

完成该课程并获得认证

开始吧
广告