Progress Bars
A progress bar can be used to display a percentage of progress out of 100. The only two things driving these progress bars are an outer element with the .progress
class as as an inner <span>
containing an inline style style="width: __%"
where the "__" signifies a number under 100.
Thanks to Chris Coyier of CSS Tricks for his tutorial on CSS Progress Bars.
This add-on requires the font-size()
and vendor
mixins, and the $base-font-size
variable in order for the SASS or LESS files to compile without modification.
Basic
A basic progress bar contains a green background with optional text.
Sizes
There are both a small and large version of the .progress
class.
Striped & Animated
You can add the class .progress-striped
to any progress bar to make it striped. In addition, adding the class .progress-animate
will animate the stripes in the progress bar.
Stacked
You also can stack progress bars by simply adding the class .progress-stacked
and nesting multiple <span>
tags within your .progress
class.