badge-secondary
bootstrap5.css
bootstrap5.css
.badge-secondary {
color: #fff;
background-color: #6c757d;
}
bootstrap5.css
a.badge-secondary:hover,
a.badge-secondary:focus {
color: #fff;
background-color: #545b62;
}
bootstrap5.css
a.badge-secondary:focus,
a.badge-secondary.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
}
html bootstrap5 Sample
バッジ基本的な使用例:badge
primary 1
secondary 11
success 111
danger 1111
warning 0
info 99
light 999
dark 9999
<p>primary <span class="badge badge-primary">1</span></p>
<p>secondary <span class="badge badge-secondary">11</span></p>
<p>success <span class="badge badge-success">111</span></p>
<p>danger <span class="badge badge-danger">1111</span></p>
<p>warning <span class="badge badge-warning">0</span></p>
<p>info <span class="badge badge-info">99</span></p>
<p>light <span class="badge badge-light">999</span></p>
<p>dark <span class="badge badge-dark">9999</span></p>
ピル型のバッジを作成する:badge-pill
<span class="badge badge-pill badge-primary">Primary</span>
<span class="badge badge-pill badge-secondary">Secondary</span>
<span class="badge badge-pill badge-success">Success</span>
<span class="badge badge-pill badge-danger">Danger</span>
<span class="badge badge-pill badge-warning">Warning</span>
<span class="badge badge-pill badge-info">Info</span>
<span class="badge badge-pill badge-light">Light</span>
<span class="badge badge-pill badge-dark">Dark</span>