Colors

优质
小牛编辑
126浏览
2023-12-01

描述 (Description)

可以使用.success.warning.alert等颜色类来设置进度条的样式

例子 (Example)

以下示例演示如何为Foundation中color the progress bar

<html>
   <head>
      <title>Progress Bar Coloring</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
   </head>
   <body>
      <h2>Progress Bar</h2>
      <div class = "warning progress" role = "progressbar" tabindex = "0" aria-valuenow = "25" aria-valuemin = "0" aria-valuetext = "25 percent" aria-valuemax = "100">
         <div class = "progress-meter" style = "width: 25%"></div>
      </div>
      <div class = "alert progress">
         <div class = "progress-meter" style = "width: 50%"></div>
      </div>
      <div class = "success progress">
         <div class = "progress-meter" style = "width: 75%"></div>
      </div>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
      <script>
         $(document).ready(function() {
            $(document).foundation();
         })
      </script>
   </body>
</html>