Foundation Progress Bar

Foundation progress bar can be displayed as the degree of program processing:

We can<div>use in the element.progressClass to create the progress bar,.meterThe class is used for child elements (<span>). We can set the progress percentage in the <span> element, as shown below:

Example

<div class="progress">
  <span class="meter" style="width:70%"></span>
</div>

Try it Yourself »

progress bar color

By default, the progress bar color is blue. The classes for different colors are:.secondary, .success, or .alert:

Example

<div class="progress">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress secondary">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress success">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress alert">
  <span class="meter" style="width:50%"></span>
</div>

Try it Yourself »

rounded progress bar

.radiusand.roundClass used to add rounded corners to the progress bar:

Example

<div class="progress">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress radius">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress round">
  <span class="meter" style="width:50%"></span>
</div>

Try it Yourself »

progress bar size

You can use.small-numor.large-numTo modify the width of the progress bar,numis a number between 1 (8.33%) and 12 (default (100%)):

Example

<div class="progress large-1">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress large-6">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress large-9">
  <span class="meter" style="width:50%"></span>
</div>

<div class="progress large-11">
  <span class="meter" style="width:50%"></span>
</div>

<!-- Default width -->
<div class="progress large-12">
  <span class="meter" style="width:50%"></span>
</div>

Try it Yourself »

progress bar label

CSS can be used to add labels to the progress bar. In the following example, we added a <span> element to display the percentage:

Example

 <style>
.percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  color: white;
  transform: translate(-50%, -50%);
  font-size: 12px;
}
</style>

<div class="progress">
  <span class="meter" style="position:relative;width:75%">
    <span class="percentage">75%</span>
  </span>
</div>

<div class="progress success">
  <span class="meter" style="position:relative;width:50%">
    <span class="percentage">50%</span>
  </span>
</div>

<div class="progress alert">
  <span class="meter" style="position:relative;width:25%">
    <span class="percentage">25%</span>
  </span>
</div>

Try it Yourself »
other extensions