btn-outline-primary
bootstrap5.css
bootstrap5.css
.btn-outline-primary {
color: #007bff;
border-color: #007bff;
}
bootstrap5.css
.btn-outline-primary:hover {
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
bootstrap5.css
.btn-outline-primary:focus,
.btn-outline-primary.focus {
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}
bootstrap5.css
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
color: #007bff;
background-color: transparent;
}
bootstrap5.css
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
bootstrap5.css
.btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.btn-outline-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}
html bootstrap5 Sample
アウトラインボタンの色:btn-outline-*
<!-- 塗りつぶしがない -->
<button class="btn btn-outline-primary">outline-primary</button>
<button class="btn btn-outline-secondary">outline-secondary</button>
<button class="btn btn-outline-success">outline-success</button>
<button class="btn btn-outline-danger">outline-danger</button>
<button class="btn btn-outline-warning">outline-warning</button>
<button class="btn btn-outline-info">outline-info</button>
<button class="btn btn-outline-light">outline-light</button>
<button class="btn btn-outline-dark">outline-dark</button>
navbar-lightで文字色を暗くし、背景色をCSSで設定
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<a class="navbar-brand" href="#">ブランド</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent3"
aria-controls="navbarSupportedContent3" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent3">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="#">リンク1</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク2</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク3</a></li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="検索" aria-label="検索">
<button class="btn btn-outline-primary my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>