「Bootstrap 4入門」.badge-*でバッジを表示するサンプル
書式
.badge, .badge-*:バッジを表示
使用例
<head> <title>Bootstrapのサンプル</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/twitter-bootstrap/4.3.1/css/bootstrap.min.css"> <script src="/jquery/3.2.1/jquery.min.js"></script> <script src="/popper.js/1.15.0/umd/popper.min.js"></script> <script src="/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <div class="container"> <h2>バッジを表示</h2> <span class="badge badge-primary">Primary</span> <span class="badge badge-secondary">Secondary</span> <span class="badge badge-success">成功</span> <span class="badge badge-danger">危険</span> <span class="badge badge-warning">警告</span> <span class="badge badge-info">情報</span> <span class="badge badge-light">Light</span> <span class="badge badge-dark">Dark</span> </div>