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

We can do it in 尝试一下 » 默认情况下,进度条颜色为蓝色。不同颜色的类为: 尝试一下 » 尝试一下 » Can be used 尝试一下 » You can use CSS to tag the progress bar. In the following example, we added a < span > element to display the percentage:
<div>
Element used in the
.progress
Class to create a progress bar
.meter
Class is used for child elements (< span >). We can set the progress percentage in the < span > element, as shown below: 8.10.1. Example ¶
<div class="progress">
<span class="meter" style="width:70%"></span>
</div>
Progress bar color ¶
.secondary
,
.success
, 或
.alert
: 8.10.2. 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>
Fillet progress bar ¶
.radius
And
.round
Class is used to add a fillet effect to the progress bar 8.10.3. 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>
Progress bar size ¶
.small-num
Or
.large-num
To modify the width of the progress bar num Is a number between 1 (8.33%) and 12 (default): 8.10.4. 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>
Progress bar label ¶
8.10.5. 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>