mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-23 02:36:11 +02:00
853 B
853 B
layout, title, description, keywords
layout | title | description | keywords |
---|---|---|---|
layouts/post.njk | Progress bar | Create a progress bar with CSS flexbox | css flexbox, css progress bar |
HTML
<div class="container">
<!-- Width based on the number of percentages -->
<div class="container__progress" style="width: 40%;">
<!-- The number of percentages -->
40%
</div>
</div>
CSS
.progress-bar {
/* Colors */
background-color: #d1d5db;
/* Rounded border */
border-radius: 9999px;
padding: 0.25rem;
}
.progress-bar__progress {
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Colors */
background-color: #3b82f6;
color: #fff;
/* Rounded border */
border-radius: 9999px;
}
{% demo %} {% include "covers/progress-bar.njk" %} {% enddemo %}