mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-24 19:26:26 +02:00
535 B
535 B
layout, title, description, keywords
| layout | title | description | keywords |
|---|---|---|---|
| layouts/post.njk | Badge | Create a badge component with CSS flexbox | css badge, css flexbox |
HTML
<div class="badge">
...
</div>
CSS
.badge {
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Colors */
background-color: #d1d5db;
color: #fff;
/* Rounded border */
border-radius: 9999px;
height: 3rem;
width: 3rem;
}
{% demo %}{% include "covers/badge.njk" %}{% enddemo %}