目录

With Text

描述 (Description)

通过使用progress-meter-text类,可以将进度条与文本一起使用。

例子 (Example)

以下示例演示了在Foundation中使用progress bar with textprogress bar with text

<html>
   <head>
      <title>Progress Bar With Text</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 = "progress" role = "progressbar" tabindex = "0" aria-valuenow = "50" 
         aria-valuemin = "0" aria-valuetext = "50 percent" aria-valuemax = "100">
         <span class = "progress-meter" style = "width: 50%">
            <p class = "progress-meter-text">50%</p>
         </span>
      </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>

输出 (Output)

让我们执行以下步骤,看看上面给出的代码是如何工作的 -

  • 保存上面给出的html代码progress_with_text.html文件。

  • 在浏览器中打开此HTML文件,输出显示如下。

新页面打开
↑回到顶部↑
WIKI教程 @2018