Bootstrap4 Progress Bar

A progress bar can show the completion progress of a user's task.
The steps to create a basic progress bar are as follows:
- Add one with .progress The class's
。
- Next, inside the
, add an empty .progress-bar with class。
- Add a style attribute with a percentage width, for example style="width:70%" means the progress bar is at 70% 's position.
Example
<div class="progress">
<div class="progress-bar" style="width:70%" div div>Try it »
Progress Bar Height
The default progress bar height is 16px. We can use CSS's height property to modify it:
Example
<div class="progress" style=">height:20px;
"
<div class="progress-bar" style=">width:40%;
"
div
div
Try it »
Progress Bar Label
You can add text inside the progress bar, such as the percentage of progress:
Example
<div class="progress">
<div class="progress-bar" style="width:70%" 70%div div>Try it »
Progress Bars with Different Colors
By default, the progress bar is blue. Bootstrap4 also provides progress bars in the following colors:

Example
<div class="progress">
<div class=">progress-bar bg-success
"
style
=
"
width:40%
"
div
div
<div class="progress">
<div class=">progress-bar bg-info
"
style
=
"
width:50%
"
div
div
<div class="progress">
<div class=">progress-bar bg-warning
"
style
=
"
width:60%
"
div
div
<div class="progress">
<div class=">progress-bar bg-danger
"
style
=
"
width:70%
"
div
div
Try it »
Striped Progress Bar
You can use the .progress-bar-striped class to set a striped progress bar:
Example
<div class="progress">
<div class=">progress-bar progress-bar-striped
"
style
=
"
width:40%
"
div
div
Try it »
Animated Progress Bar
Use .progress-bar-animated class can add animation to the progress bar:
Example
<div class=">progress-bar progress-bar-striped progress-bar-animated
"
style
=
"
width: 40%
"
div
Try it »
Mixed-color Progress Bar
A progress bar can be set to multiple colors:
Example
<div class="progress">
<div class=">progress-bar bg-success
"
style
=
"
width:40%
"
Free Space
div
<div class=">progress-bar bg-warning
"
style
=
"
width:10%
"
Warning
div
<div class=">progress-bar bg-danger
"
style
=
"
width:20%
"
Danger
div
div
Try it »