alert-success
bootstrap5.css
bootstrap5.css
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
bootstrap5.css
.alert-success hr {
border-top-color: #b1dfbb;
}
bootstrap5.css
.alert-success .alert-link {
color: #0b2e13;
}
html bootstrap5 Sample
アラートの背景色:alert-*
alert-primary
alert-secondary
alert-success
alert-danger
alert-warning
alert-info
alert-light
alert-dark
<div class="alert alert-primary" role="alert">alert-primary</div>
<div class="alert alert-secondary" role="alert">alert-secondary</div>
<div class="alert alert-success" role="alert">alert-success</div>
<div class="alert alert-danger" role="alert">alert-danger</div>
<div class="alert alert-warning" role="alert">alert-warning</div>
<div class="alert alert-info" role="alert">alert-info</div>
<div class="alert alert-light" role="alert">alert-light</div>
<div class="alert alert-dark" role="alert">alert-dark</div>
アラート内にコンテンツを追加する:alert
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">アラートのタイトル</h4>
<p>アラートの内容</p>
<p class="mb-0"><a href="#" class="alert-link">詳細内容へ</a></p>
<p class="mb-0"><a href="#">問い合わせ</a></p>
</div>