em
bootstrap5.css
bootstrap5.css
:root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;
--white: #fff;
--gray: #6c757d;
--gray-dark: #343a40;
--primary: #007bff;
--secondary: #6c757d;
--success: #28a745;
--info: #17a2b8;
--warning: #ffc107;
--danger: #dc3545;
--light: #f8f9fa;
--dark: #343a40;
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
bootstrap5.css
body {
/* bodyの最初の設定 */
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
bootstrap5.css
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
bootstrap5.css
p {
margin-top: 0;
margin-bottom: 1rem;
}
bootstrap5.css
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
bootstrap5.css
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
bootstrap5.css
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
bootstrap5.css
blockquote {
margin: 0 0 1rem;
}
bootstrap5.css
sub {
bottom: -0.25em;
}
bootstrap5.css
sup {
top: -0.5em;
}
bootstrap5.css
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
bootstrap5.css
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
bootstrap5.css
figure {
margin: 0 0 1rem;
}
bootstrap5.css
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
bootstrap5.css
label {
display: inline-block;
margin-bottom: 0.5rem;
}
bootstrap5.css
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
bootstrap5.css
summary {
display: list-item;
cursor: pointer;
}
bootstrap5.css
template {
display: none;
}
bootstrap5.css
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
bootstrap5.css
h1,
.h1 {
font-size: 2.5rem;
}
bootstrap5.css
h2,
.h2 {
font-size: 2rem;
}
bootstrap5.css
h3,
.h3 {
font-size: 1.75rem;
}
bootstrap5.css
h4,
.h4 {
font-size: 1.5rem;
}
bootstrap5.css
h5,
.h5 {
font-size: 1.25rem;
}
bootstrap5.css
h6,
.h6 {
font-size: 1rem;
}
bootstrap5.css
.lead {
font-size: 1.25rem;
font-weight: 300;
}
bootstrap5.css
.display-1 {
font-size: 6rem;
font-weight: 300;
line-height: 1.2;
}
bootstrap5.css
.display-2 {
font-size: 5.5rem;
font-weight: 300;
line-height: 1.2;
}
bootstrap5.css
.display-3 {
font-size: 4.5rem;
font-weight: 300;
line-height: 1.2;
}
bootstrap5.css
.display-4 {
font-size: 3.5rem;
font-weight: 300;
line-height: 1.2;
}
bootstrap5.css
hr {
margin-top: 1rem;
margin-bottom: 1rem;
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
bootstrap5.css
mark,
.mark {
padding: 0.2em;
background-color: #fcf8e3;
}
bootstrap5.css
.list-inline-item {
display: inline-block;
}
bootstrap5.css
.list-inline-item:not(:last-child) {
margin-right: 0.5rem;
}
bootstrap5.css
.blockquote {
margin-bottom: 1rem;
font-size: 1.25rem;
}
bootstrap5.css
.img-thumbnail {
padding: 0.25rem;
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
max-width: 100%;
height: auto;
}
bootstrap5.css
.figure-img {
margin-bottom: 0.5rem;
line-height: 1;
}
bootstrap5.css
kbd {
padding: 0.2rem 0.4rem;
font-size: 87.5%;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
bootstrap5.css
.table {
width: 100%;
margin-bottom: 1rem;
color: #212529;
}
bootstrap5.css
.table th,
.table td {
padding: 0.75rem;
vertical-align: top;
border-top: 1px solid #dee2e6;
}
bootstrap5.css
.table-sm th,
.table-sm td {
padding: 0.3rem;
}
bootstrap5.css
.form-control {
display: block;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
bootstrap5.css
.form-control:focus {
color: #495057;
background-color: #fff;
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.col-form-label {
padding-top: calc(0.375rem + 1px);
padding-bottom: calc(0.375rem + 1px);
margin-bottom: 0;
font-size: inherit;
line-height: 1.5;
}
bootstrap5.css
.col-form-label-lg {
padding-top: calc(0.5rem + 1px);
padding-bottom: calc(0.5rem + 1px);
font-size: 1.25rem;
line-height: 1.5;
}
bootstrap5.css
.col-form-label-sm {
padding-top: calc(0.25rem + 1px);
padding-bottom: calc(0.25rem + 1px);
font-size: 0.875rem;
line-height: 1.5;
}
bootstrap5.css
.form-control-plaintext {
display: block;
width: 100%;
padding-top: 0.375rem;
padding-bottom: 0.375rem;
margin-bottom: 0;
line-height: 1.5;
color: #212529;
background-color: transparent;
border: solid transparent;
border-width: 1px 0;
}
bootstrap5.css
.form-control-sm {
height: calc(1.5em + 0.5rem + 2px);
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
border-radius: 0.2rem;
}
bootstrap5.css
.form-control-lg {
height: calc(1.5em + 1rem + 2px);
padding: 0.5rem 1rem;
font-size: 1.25rem;
line-height: 1.5;
border-radius: 0.3rem;
}
bootstrap5.css
.form-group {
margin-bottom: 1rem;
}
bootstrap5.css
.form-text {
display: block;
margin-top: 0.25rem;
}
bootstrap5.css
.form-check {
position: relative;
display: block;
padding-left: 1.25rem;
}
bootstrap5.css
.form-check-input {
position: absolute;
margin-top: 0.3rem;
margin-left: -1.25rem;
}
bootstrap5.css
.form-check-inline {
display: -ms-inline-flexbox;
display: inline-flex;
-ms-flex-align: center;
align-items: center;
padding-left: 0;
margin-right: 0.75rem;
}
bootstrap5.css
.form-check-inline .form-check-input {
position: static;
margin-top: 0;
margin-right: 0.3125rem;
margin-left: 0;
}
bootstrap5.css
.valid-feedback {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
color: #28a745;
}
bootstrap5.css
.valid-tooltip {
position: absolute;
top: 100%;
z-index: 5;
display: none;
max-width: 100%;
padding: 0.25rem 0.5rem;
margin-top: 0.1rem;
font-size: 0.875rem;
line-height: 1.5;
color: #fff;
background-color: rgba(40, 167, 69, 0.9);
border-radius: 0.25rem;
}
bootstrap5.css
.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
border-color: #28a745;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
bootstrap5.css
.was-validated textarea.form-control:valid,
textarea.form-control.is-valid {
padding-right: calc(1.5em + 0.75rem);
background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
}
bootstrap5.css
.was-validated .custom-select:valid:focus,
.custom-select.is-valid:focus {
border-color: #28a745;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
bootstrap5.css
.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before,
.custom-control-input.is-valid:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
bootstrap5.css
.was-validated .custom-file-input:valid:focus ~ .custom-file-label,
.custom-file-input.is-valid:focus ~ .custom-file-label {
border-color: #28a745;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
bootstrap5.css
.invalid-feedback {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
color: #dc3545;
}
bootstrap5.css
.invalid-tooltip {
position: absolute;
top: 100%;
z-index: 5;
display: none;
max-width: 100%;
padding: 0.25rem 0.5rem;
margin-top: 0.1rem;
font-size: 0.875rem;
line-height: 1.5;
color: #fff;
background-color: rgba(220, 53, 69, 0.9);
border-radius: 0.25rem;
}
bootstrap5.css
.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
border-color: #dc3545;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
bootstrap5.css
.was-validated textarea.form-control:invalid,
textarea.form-control.is-invalid {
padding-right: calc(1.5em + 0.75rem);
background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
}
bootstrap5.css
.was-validated .custom-select:invalid:focus,
.custom-select.is-invalid:focus {
border-color: #dc3545;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
bootstrap5.css
.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before,
.custom-control-input.is-invalid:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
bootstrap5.css
.was-validated .custom-file-input:invalid:focus ~ .custom-file-label,
.custom-file-input.is-invalid:focus ~ .custom-file-label {
border-color: #dc3545;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
bootstrap5.css
.form-inline {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-align: center;
align-items: center;
}
bootstrap5.css
@media (min-width: 576px) {
.form-inline label {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
margin-bottom: 0;
}
.form-inline .form-group {
display: -ms-flexbox;
display: flex;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-align: center;
align-items: center;
margin-bottom: 0;
}
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.form-inline .form-control-plaintext {
display: inline-block;
}
.form-inline .input-group,
.form-inline .custom-select {
width: auto;
}
.form-inline .form-check {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
width: auto;
padding-left: 0;
}
.form-inline .form-check-input {
position: relative;
-ms-flex-negative: 0;
flex-shrink: 0;
margin-top: 0;
margin-right: 0.25rem;
margin-left: 0;
}
.form-inline .custom-control {
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
}
.form-inline .custom-control-label {
margin-bottom: 0;
}
}
bootstrap5.css
.btn {
display: inline-block;
font-weight: 400;
color: #212529;
text-align: center;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
bootstrap5.css
.btn:focus,
.btn.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.btn-primary:focus,
.btn-primary.focus {
box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}
bootstrap5.css
.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}
bootstrap5.css
.btn-secondary:focus,
.btn-secondary.focus {
box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
}
bootstrap5.css
.btn-secondary:not(:disabled):not(.disabled):active:focus,
.btn-secondary:not(:disabled):not(.disabled).active:focus,
.show > .btn-secondary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
}
bootstrap5.css
.btn-success:focus,
.btn-success.focus {
box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
}
bootstrap5.css
.btn-success:not(:disabled):not(.disabled):active:focus,
.btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
}
bootstrap5.css
.btn-info:focus,
.btn-info.focus {
box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);
}
bootstrap5.css
.btn-info:not(:disabled):not(.disabled):active:focus,
.btn-info:not(:disabled):not(.disabled).active:focus,
.show > .btn-info.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);
}
bootstrap5.css
.btn-warning:focus,
.btn-warning.focus {
box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);
}
bootstrap5.css
.btn-warning:not(:disabled):not(.disabled):active:focus,
.btn-warning:not(:disabled):not(.disabled).active:focus,
.show > .btn-warning.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);
}
bootstrap5.css
.btn-danger:focus,
.btn-danger.focus {
box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
}
bootstrap5.css
.btn-danger:not(:disabled):not(.disabled):active:focus,
.btn-danger:not(:disabled):not(.disabled).active:focus,
.show > .btn-danger.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
}
bootstrap5.css
.btn-light:focus,
.btn-light.focus {
box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
}
bootstrap5.css
.btn-light:not(:disabled):not(.disabled):active:focus,
.btn-light:not(:disabled):not(.disabled).active:focus,
.show > .btn-light.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
}
bootstrap5.css
.btn-dark:focus,
.btn-dark.focus {
box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
}
bootstrap5.css
.btn-dark:not(:disabled):not(.disabled):active:focus,
.btn-dark:not(:disabled):not(.disabled).active:focus,
.show > .btn-dark.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
}
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: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);
}
bootstrap5.css
.btn-outline-secondary:focus,
.btn-outline-secondary.focus {
box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
}
bootstrap5.css
.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,
.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-secondary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
}
bootstrap5.css
.btn-outline-success:focus,
.btn-outline-success.focus {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}
bootstrap5.css
.btn-outline-success:not(:disabled):not(.disabled):active:focus,
.btn-outline-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-success.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}
bootstrap5.css
.btn-outline-info:focus,
.btn-outline-info.focus {
box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
}
bootstrap5.css
.btn-outline-info:not(:disabled):not(.disabled):active:focus,
.btn-outline-info:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-info.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
}
bootstrap5.css
.btn-outline-warning:focus,
.btn-outline-warning.focus {
box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
}
bootstrap5.css
.btn-outline-warning:not(:disabled):not(.disabled):active:focus,
.btn-outline-warning:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-warning.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
}
bootstrap5.css
.btn-outline-danger:focus,
.btn-outline-danger.focus {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
}
bootstrap5.css
.btn-outline-danger:not(:disabled):not(.disabled):active:focus,
.btn-outline-danger:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-danger.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
}
bootstrap5.css
.btn-outline-light:focus,
.btn-outline-light.focus {
box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}
bootstrap5.css
.btn-outline-light:not(:disabled):not(.disabled):active:focus,
.btn-outline-light:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-light.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}
bootstrap5.css
.btn-outline-dark:focus,
.btn-outline-dark.focus {
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
bootstrap5.css
.btn-outline-dark:not(:disabled):not(.disabled):active:focus,
.btn-outline-dark:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-dark.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
bootstrap5.css
.btn-lg,
.btn-group-lg > .btn {
padding: 0.5rem 1rem;
font-size: 1.25rem;
line-height: 1.5;
border-radius: 0.3rem;
}
bootstrap5.css
.btn-sm,
.btn-group-sm > .btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
border-radius: 0.2rem;
}
bootstrap5.css
.btn-block + .btn-block {
margin-top: 0.5rem;
}
bootstrap5.css
.dropdown-toggle::after {
display: inline-block;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid;
border-right: 0.3em solid transparent;
border-bottom: 0;
border-left: 0.3em solid transparent;
}
bootstrap5.css
.dropdown-toggle:empty::after {
margin-left: 0;
}
bootstrap5.css
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 10rem;
padding: 0.5rem 0;
margin: 0.125rem 0 0;
font-size: 1rem;
color: #212529;
text-align: left;
list-style: none;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
}
bootstrap5.css
.dropup .dropdown-menu {
top: auto;
bottom: 100%;
margin-top: 0;
margin-bottom: 0.125rem;
}
bootstrap5.css
.dropup .dropdown-toggle::after {
display: inline-block;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0;
border-right: 0.3em solid transparent;
border-bottom: 0.3em solid;
border-left: 0.3em solid transparent;
}
bootstrap5.css
.dropup .dropdown-toggle:empty::after {
margin-left: 0;
}
bootstrap5.css
.dropright .dropdown-menu {
top: 0;
right: auto;
left: 100%;
margin-top: 0;
margin-left: 0.125rem;
}
bootstrap5.css
.dropright .dropdown-toggle::after {
display: inline-block;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid transparent;
border-right: 0;
border-bottom: 0.3em solid transparent;
border-left: 0.3em solid;
}
bootstrap5.css
.dropright .dropdown-toggle:empty::after {
margin-left: 0;
}
bootstrap5.css
.dropleft .dropdown-menu {
top: 0;
right: 100%;
left: auto;
margin-top: 0;
margin-right: 0.125rem;
}
bootstrap5.css
.dropleft .dropdown-toggle::after {
display: inline-block;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
}
bootstrap5.css
.dropleft .dropdown-toggle::before {
display: inline-block;
margin-right: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid transparent;
border-right: 0.3em solid;
border-bottom: 0.3em solid transparent;
}
bootstrap5.css
.dropleft .dropdown-toggle:empty::after {
margin-left: 0;
}
bootstrap5.css
.dropdown-menu[x-placement^="top"],
.dropdown-menu[x-placement^="right"],
.dropdown-menu[x-placement^="bottom"],
.dropdown-menu[x-placement^="left"] {
right: auto;
bottom: auto;
}
bootstrap5.css
.dropdown-divider {
height: 0;
margin: 0.5rem 0;
overflow: hidden;
border-top: 1px solid #e9ecef;
}
bootstrap5.css
.dropdown-item {
display: block;
width: 100%;
padding: 0.25rem 1.5rem;
clear: both;
font-weight: 400;
color: #212529;
text-align: inherit;
white-space: nowrap;
background-color: transparent;
border: 0;
}
bootstrap5.css
.dropdown-item:hover,
.dropdown-item:focus {
color: #16181b;
text-decoration: none;
background-color: #f8f9fa;
}
bootstrap5.css
.dropdown-item.active,
.dropdown-item:active {
color: #fff;
text-decoration: none;
background-color: #007bff;
}
bootstrap5.css
.dropdown-item.disabled,
.dropdown-item:disabled {
color: #6c757d;
pointer-events: none;
background-color: transparent;
}
bootstrap5.css
.dropdown-header {
display: block;
padding: 0.5rem 1.5rem;
margin-bottom: 0;
font-size: 0.875rem;
color: #6c757d;
white-space: nowrap;
}
bootstrap5.css
.dropdown-item-text {
display: block;
padding: 0.25rem 1.5rem;
color: #212529;
}
bootstrap5.css
.dropdown-toggle-split {
padding-right: 0.5625rem;
padding-left: 0.5625rem;
}
bootstrap5.css
.btn-sm + .dropdown-toggle-split,
.btn-group-sm > .btn + .dropdown-toggle-split {
padding-right: 0.375rem;
padding-left: 0.375rem;
}
bootstrap5.css
.btn-lg + .dropdown-toggle-split,
.btn-group-lg > .btn + .dropdown-toggle-split {
padding-right: 0.75rem;
padding-left: 0.75rem;
}
bootstrap5.css
.btn-group-vertical {
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: center;
justify-content: center;
}
bootstrap5.css
.input-group {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: stretch;
align-items: stretch;
width: 100%;
}
bootstrap5.css
.input-group > .custom-file {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
}
bootstrap5.css
.input-group-text {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding: 0.375rem 0.75rem;
margin-bottom: 0;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
text-align: center;
white-space: nowrap;
background-color: #e9ecef;
border: 1px solid #ced4da;
border-radius: 0.25rem;
}
bootstrap5.css
.input-group-lg > .form-control:not(textarea),
.input-group-lg > .custom-select {
height: calc(1.5em + 1rem + 2px);
}
bootstrap5.css
.input-group-lg > .form-control,
.input-group-lg > .custom-select,
.input-group-lg > .input-group-prepend > .input-group-text,
.input-group-lg > .input-group-append > .input-group-text,
.input-group-lg > .input-group-prepend > .btn,
.input-group-lg > .input-group-append > .btn {
padding: 0.5rem 1rem;
font-size: 1.25rem;
line-height: 1.5;
border-radius: 0.3rem;
}
bootstrap5.css
.input-group-sm > .form-control:not(textarea),
.input-group-sm > .custom-select {
height: calc(1.5em + 0.5rem + 2px);
}
bootstrap5.css
.input-group-sm > .form-control,
.input-group-sm > .custom-select,
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .input-group-append > .input-group-text,
.input-group-sm > .input-group-prepend > .btn,
.input-group-sm > .input-group-append > .btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
border-radius: 0.2rem;
}
bootstrap5.css
.input-group-lg > .custom-select,
.input-group-sm > .custom-select {
padding-right: 1.75rem;
}
bootstrap5.css
.custom-control {
position: relative;
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
}
bootstrap5.css
.custom-control-inline {
display: -ms-inline-flexbox;
display: inline-flex;
margin-right: 1rem;
}
bootstrap5.css
.custom-control-input:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-control-label::before {
position: absolute;
top: 0.25rem;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
pointer-events: none;
content: "";
background-color: #fff;
border: #adb5bd solid 1px;
}
bootstrap5.css
.custom-control-label::after {
position: absolute;
top: 0.25rem;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
content: "";
background: no-repeat 50% / 50% 50%;
}
bootstrap5.css
.custom-checkbox .custom-control-label::before {
border-radius: 0.25rem;
}
bootstrap5.css
.custom-switch {
padding-left: 2.25rem;
}
bootstrap5.css
.custom-switch .custom-control-label::before {
left: -2.25rem;
width: 1.75rem;
pointer-events: all;
border-radius: 0.5rem;
}
bootstrap5.css
.custom-switch .custom-control-label::after {
top: calc(0.25rem + 2px);
left: calc(-2.25rem + 2px);
width: calc(1rem - 4px);
height: calc(1rem - 4px);
background-color: #adb5bd;
border-radius: 0.5rem;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-transform 0.15s ease-in-out;
transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-transform 0.15s ease-in-out;
}
bootstrap5.css
.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
background-color: #fff;
-webkit-transform: translateX(0.75rem);
transform: translateX(0.75rem);
}
bootstrap5.css
.custom-select:focus {
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-select[multiple],
.custom-select[size]:not([size="1"]) {
height: auto;
padding-right: 0.75rem;
background-image: none;
}
bootstrap5.css
.custom-select-sm {
height: calc(1.5em + 0.5rem + 2px);
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-left: 0.5rem;
font-size: 0.875rem;
}
bootstrap5.css
.custom-select-lg {
height: calc(1.5em + 1rem + 2px);
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-left: 1rem;
font-size: 1.25rem;
}
bootstrap5.css
.custom-file {
position: relative;
display: inline-block;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
margin-bottom: 0;
}
bootstrap5.css
.custom-file-input {
position: relative;
z-index: 2;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
margin: 0;
opacity: 0;
}
bootstrap5.css
.custom-file-input:focus ~ .custom-file-label {
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-file-label {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 1;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
}
bootstrap5.css
.custom-file-label::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: 3;
display: block;
height: calc(1.5em + 0.75rem);
padding: 0.375rem 0.75rem;
line-height: 1.5;
color: #495057;
content: "Browse";
background-color: #e9ecef;
border-left: inherit;
border-radius: 0 0.25rem 0.25rem 0;
}
bootstrap5.css
.custom-range {
width: 100%;
height: calc(1rem + 0.4rem);
padding: 0;
background-color: transparent;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
bootstrap5.css
.custom-range:focus::-webkit-slider-thumb {
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-range:focus::-moz-range-thumb {
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-range:focus::-ms-thumb {
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.custom-range::-webkit-slider-thumb {
width: 1rem;
height: 1rem;
margin-top: -0.25rem;
background-color: #007bff;
border: 0;
border-radius: 1rem;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-webkit-appearance: none;
appearance: none;
}
bootstrap5.css
.custom-range::-webkit-slider-runnable-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem;
}
bootstrap5.css
.custom-range::-moz-range-thumb {
width: 1rem;
height: 1rem;
background-color: #007bff;
border: 0;
border-radius: 1rem;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-moz-appearance: none;
appearance: none;
}
bootstrap5.css
.custom-range::-moz-range-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem;
}
bootstrap5.css
.custom-range::-ms-thumb {
width: 1rem;
height: 1rem;
margin-top: 0;
margin-right: 0.2rem;
margin-left: 0.2rem;
background-color: #007bff;
border: 0;
border-radius: 1rem;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
appearance: none;
}
bootstrap5.css
.custom-range::-ms-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: transparent;
border-color: transparent;
border-width: 0.5rem;
}
bootstrap5.css
.custom-range::-ms-fill-lower {
background-color: #dee2e6;
border-radius: 1rem;
}
bootstrap5.css
.custom-range::-ms-fill-upper {
margin-right: 15px;
background-color: #dee2e6;
border-radius: 1rem;
}
bootstrap5.css
.nav-link {
display: block;
padding: 0.5rem 1rem;
}
bootstrap5.css
.nav-tabs .nav-item {
margin-bottom: -1px;
}
bootstrap5.css
.nav-tabs .nav-link {
border: 1px solid transparent;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
bootstrap5.css
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
color: #495057;
background-color: #fff;
border-color: #dee2e6 #dee2e6 #fff;
}
bootstrap5.css
.nav-pills .nav-link {
border-radius: 0.25rem;
}
bootstrap5.css
.nav-fill .nav-item {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
text-align: center;
}
bootstrap5.css
.nav-justified .nav-item {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
text-align: center;
}
bootstrap5.css
.navbar {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 0.5rem 1rem;
}
bootstrap5.css
.navbar > .container,
.navbar > .container-fluid {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: justify;
justify-content: space-between;
}
bootstrap5.css
.navbar-brand {
display: inline-block;
padding-top: 0.3125rem;
padding-bottom: 0.3125rem;
margin-right: 1rem;
font-size: 1.25rem;
line-height: inherit;
white-space: nowrap;
}
bootstrap5.css
.navbar-text {
display: inline-block;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
bootstrap5.css
.navbar-collapse {
-ms-flex-preferred-size: 100%;
flex-basis: 100%;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-align: center;
align-items: center;
}
bootstrap5.css
.navbar-toggler {
padding: 0.25rem 0.75rem;
font-size: 1.25rem;
line-height: 1;
background-color: transparent;
border: 1px solid transparent;
border-radius: 0.25rem;
}
bootstrap5.css
.navbar-toggler-icon {
display: inline-block;
width: 1.5em;
height: 1.5em;
vertical-align: middle;
content: "";
background: no-repeat center center;
background-size: 100% 100%;
}
bootstrap5.css
@media (min-width: 576px) {
.navbar-expand-sm {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-sm .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-sm .navbar-nav .dropdown-menu {
position: absolute;
}
.navbar-expand-sm .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
.navbar-expand-sm > .container,
.navbar-expand-sm > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-sm .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-sm .navbar-toggler {
display: none;
}
}
bootstrap5.css
@media (min-width: 768px) {
.navbar-expand-md {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-md .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-md .navbar-nav .dropdown-menu {
position: absolute;
}
.navbar-expand-md .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
.navbar-expand-md > .container,
.navbar-expand-md > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-md .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-md .navbar-toggler {
display: none;
}
}
bootstrap5.css
@media (min-width: 992px) {
.navbar-expand-lg {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-lg .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-lg .navbar-nav .dropdown-menu {
position: absolute;
}
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
.navbar-expand-lg > .container,
.navbar-expand-lg > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-lg .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-lg .navbar-toggler {
display: none;
}
}
bootstrap5.css
@media (min-width: 1200px) {
.navbar-expand-xl {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-xl .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-xl .navbar-nav .dropdown-menu {
position: absolute;
}
.navbar-expand-xl .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
.navbar-expand-xl > .container,
.navbar-expand-xl > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-xl .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-xl .navbar-toggler {
display: none;
}
}
bootstrap5.css
.navbar-expand .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
bootstrap5.css
.card {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
}
bootstrap5.css
.card > .list-group:first-child .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
bootstrap5.css
.card > .list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
bootstrap5.css
.card-body {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1.25rem;
}
bootstrap5.css
.card-title {
margin-bottom: 0.75rem;
}
bootstrap5.css
.card-subtitle {
margin-top: -0.375rem;
margin-bottom: 0;
}
bootstrap5.css
.card-link + .card-link {
margin-left: 1.25rem;
}
bootstrap5.css
.card-header {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: rgba(0, 0, 0, 0.03);
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
bootstrap5.css
.card-header:first-child {
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}
bootstrap5.css
.card-header + .list-group .list-group-item:first-child {
border-top: 0;
}
bootstrap5.css
.card-footer {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
bootstrap5.css
.card-footer:last-child {
border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
}
bootstrap5.css
.card-header-tabs {
margin-right: -0.625rem;
margin-bottom: -0.75rem;
margin-left: -0.625rem;
border-bottom: 0;
}
bootstrap5.css
.card-header-pills {
margin-right: -0.625rem;
margin-left: -0.625rem;
}
bootstrap5.css
.card-img-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 1.25rem;
}
bootstrap5.css
.card-img {
width: 100%;
border-radius: calc(0.25rem - 1px);
}
bootstrap5.css
.card-img-top {
width: 100%;
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
bootstrap5.css
.card-img-bottom {
width: 100%;
border-bottom-right-radius: calc(0.25rem - 1px);
border-bottom-left-radius: calc(0.25rem - 1px);
}
bootstrap5.css
.card-columns .card {
margin-bottom: 0.75rem;
}
bootstrap5.css
@media (min-width: 576px) {
.card-columns {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 1.25rem;
-moz-column-gap: 1.25rem;
column-gap: 1.25rem;
orphans: 1;
widows: 1;
}
.card-columns .card {
display: inline-block;
width: 100%;
}
}
bootstrap5.css
.breadcrumb {
/* パン屑 */
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding: 0.75rem 1rem;
margin-bottom: 1rem;
list-style: none;
background-color: #e9ecef;
border-radius: 0.25rem;
}
bootstrap5.css
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem;
}
bootstrap5.css
.breadcrumb-item + .breadcrumb-item::before {
display: inline-block;
padding-right: 0.5rem;
color: #6c757d;
content: "/";
}
bootstrap5.css
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: underline;
}
bootstrap5.css
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: none;
}
bootstrap5.css
.breadcrumb-item.active {
color: #6c757d;
}
bootstrap5.css
.pagination {
/* ページネーション */
display: -ms-flexbox;
display: flex;
padding-left: 0;
list-style: none;
border-radius: 0.25rem;
}
bootstrap5.css
.page-link {
position: relative;
display: block;
padding: 0.5rem 0.75rem;
margin-left: -1px;
line-height: 1.25;
color: #007bff;
background-color: #fff;
border: 1px solid #dee2e6;
}
bootstrap5.css
.page-link:focus {
z-index: 2;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
bootstrap5.css
.page-item:first-child .page-link {
margin-left: 0;
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
bootstrap5.css
.page-item:last-child .page-link {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
}
bootstrap5.css
.page-item.active .page-link {
z-index: 1;
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
bootstrap5.css
.page-item.disabled .page-link {
color: #6c757d;
pointer-events: none;
cursor: auto;
background-color: #fff;
border-color: #dee2e6;
}
bootstrap5.css
.pagination-lg .page-link {
padding: 0.75rem 1.5rem;
font-size: 1.25rem;
line-height: 1.5;
}
bootstrap5.css
.pagination-lg .page-item:first-child .page-link {
border-top-left-radius: 0.3rem;
border-bottom-left-radius: 0.3rem;
}
bootstrap5.css
.pagination-lg .page-item:last-child .page-link {
border-top-right-radius: 0.3rem;
border-bottom-right-radius: 0.3rem;
}
bootstrap5.css
.pagination-sm .page-link {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
}
bootstrap5.css
.pagination-sm .page-item:first-child .page-link {
border-top-left-radius: 0.2rem;
border-bottom-left-radius: 0.2rem;
}
bootstrap5.css
.pagination-sm .page-item:last-child .page-link {
border-top-right-radius: 0.2rem;
border-bottom-right-radius: 0.2rem;
}
bootstrap5.css
.badge {
display: inline-block;
padding: 0.25em 0.4em;
font-size: 75%;
font-weight: 700;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
bootstrap5.css
.badge:empty {
display: none;
}
bootstrap5.css
.badge-pill {
padding-right: 0.6em;
padding-left: 0.6em;
border-radius: 10rem;
}
bootstrap5.css
a.badge-primary:focus,
a.badge-primary.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}
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);
}
bootstrap5.css
a.badge-success:focus,
a.badge-success.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}
bootstrap5.css
a.badge-info:focus,
a.badge-info.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
}
bootstrap5.css
a.badge-warning:focus,
a.badge-warning.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
}
bootstrap5.css
a.badge-danger:focus,
a.badge-danger.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
}
bootstrap5.css
a.badge-light:focus,
a.badge-light.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}
bootstrap5.css
a.badge-dark:focus,
a.badge-dark.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
bootstrap5.css
.jumbotron {
padding: 2rem 1rem;
margin-bottom: 2rem;
background-color: #e9ecef;
border-radius: 0.3rem;
}
bootstrap5.css
@media (min-width: 576px) {
.jumbotron {
padding: 4rem 2rem;
}
}
bootstrap5.css
.alert {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
bootstrap5.css
.alert-dismissible {
padding-right: 4rem;
}
bootstrap5.css
.alert-dismissible .close {
position: absolute;
top: 0;
right: 0;
padding: 0.75rem 1.25rem;
color: inherit;
}
bootstrap5.css
@-webkit-keyframes progress-bar-stripes {
from {
background-position: 1rem 0;
}
to {
background-position: 0 0;
}
}
bootstrap5.css
@keyframes progress-bar-stripes {
from {
background-position: 1rem 0;
}
to {
background-position: 0 0;
}
}
bootstrap5.css
.progress {
display: -ms-flexbox;
display: flex;
height: 1rem;
overflow: hidden;
font-size: 0.75rem;
background-color: #e9ecef;
border-radius: 0.25rem;
}
bootstrap5.css
.progress-bar-striped {
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 1rem 1rem;
}
bootstrap5.css
.media {
display: -ms-flexbox;
display: flex;
-ms-flex-align: start;
align-items: flex-start;
}
bootstrap5.css
.list-group-item-action {
/* 幅100%にして色を付けて、テキストの位置は継承する */
/* aやbuttonのインラインをリストにするために使う */
width: 100%;
color: #495057;
text-align: inherit;
}
bootstrap5.css
.list-group-item-action:hover,
.list-group-item-action:focus {
z-index: 1;
color: #495057;
text-decoration: none;
background-color: #f8f9fa;
}
bootstrap5.css
.list-group-item-action:active {
color: #212529;
background-color: #e9ecef;
}
bootstrap5.css
.list-group-item {
position: relative;
display: block;
padding: 0.75rem 1.25rem;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.125);
}
bootstrap5.css
.list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
bootstrap5.css
.list-group-item:last-child {
margin-bottom: 0;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
bootstrap5.css
.list-group-item.disabled,
.list-group-item:disabled {
color: #6c757d;
pointer-events: none;
background-color: #fff;
}
bootstrap5.css
.list-group-item.active {
z-index: 2;
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
bootstrap5.css
.list-group-horizontal .list-group-item {
margin-right: -1px;
margin-bottom: 0;
}
bootstrap5.css
.list-group-horizontal .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
bootstrap5.css
.list-group-horizontal .list-group-item:last-child {
margin-right: 0;
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
bootstrap5.css
@media (min-width: 576px) {
.list-group-horizontal-sm {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-sm .list-group-item {
margin-right: -1px;
margin-bottom: 0;
}
.list-group-horizontal-sm .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-sm .list-group-item:last-child {
margin-right: 0;
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
}
bootstrap5.css
@media (min-width: 768px) {
.list-group-horizontal-md {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-md .list-group-item {
margin-right: -1px;
margin-bottom: 0;
}
.list-group-horizontal-md .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-md .list-group-item:last-child {
margin-right: 0;
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
}
bootstrap5.css
@media (min-width: 992px) {
.list-group-horizontal-lg {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-lg .list-group-item {
margin-right: -1px;
margin-bottom: 0;
}
.list-group-horizontal-lg .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-lg .list-group-item:last-child {
margin-right: 0;
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
}
bootstrap5.css
@media (min-width: 1200px) {
.list-group-horizontal-xl {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-xl .list-group-item {
margin-right: -1px;
margin-bottom: 0;
}
.list-group-horizontal-xl .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-xl .list-group-item:last-child {
margin-right: 0;
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
}
bootstrap5.css
.list-group-flush .list-group-item {
border-right: 0;
border-left: 0;
border-radius: 0;
}
bootstrap5.css
.list-group-flush .list-group-item:last-child {
margin-bottom: -1px;
}
bootstrap5.css
.list-group-flush:first-child .list-group-item:first-child {
border-top: 0;
}
bootstrap5.css
.list-group-flush:last-child .list-group-item:last-child {
margin-bottom: 0;
border-bottom: 0;
}
bootstrap5.css
.list-group-item-primary {
color: #004085;
background-color: #b8daff;
}
bootstrap5.css
.list-group-item-primary.list-group-item-action:hover,
.list-group-item-primary.list-group-item-action:focus {
color: #004085;
background-color: #9fcdff;
}
bootstrap5.css
.list-group-item-primary.list-group-item-action.active {
color: #fff;
background-color: #004085;
border-color: #004085;
}
bootstrap5.css
.list-group-item-secondary {
color: #383d41;
background-color: #d6d8db;
}
bootstrap5.css
.list-group-item-secondary.list-group-item-action:hover,
.list-group-item-secondary.list-group-item-action:focus {
color: #383d41;
background-color: #c8cbcf;
}
bootstrap5.css
.list-group-item-secondary.list-group-item-action.active {
color: #fff;
background-color: #383d41;
border-color: #383d41;
}
bootstrap5.css
.list-group-item-success {
color: #155724;
background-color: #c3e6cb;
}
bootstrap5.css
.list-group-item-success.list-group-item-action:hover,
.list-group-item-success.list-group-item-action:focus {
color: #155724;
background-color: #b1dfbb;
}
bootstrap5.css
.list-group-item-success.list-group-item-action.active {
color: #fff;
background-color: #155724;
border-color: #155724;
}
bootstrap5.css
.list-group-item-info {
color: #0c5460;
background-color: #bee5eb;
}
bootstrap5.css
.list-group-item-info.list-group-item-action:hover,
.list-group-item-info.list-group-item-action:focus {
color: #0c5460;
background-color: #abdde5;
}
bootstrap5.css
.list-group-item-info.list-group-item-action.active {
color: #fff;
background-color: #0c5460;
border-color: #0c5460;
}
bootstrap5.css
.list-group-item-warning {
color: #856404;
background-color: #ffeeba;
}
bootstrap5.css
.list-group-item-warning.list-group-item-action:hover,
.list-group-item-warning.list-group-item-action:focus {
color: #856404;
background-color: #ffe8a1;
}
bootstrap5.css
.list-group-item-warning.list-group-item-action.active {
color: #fff;
background-color: #856404;
border-color: #856404;
}
bootstrap5.css
.list-group-item-danger {
color: #721c24;
background-color: #f5c6cb;
}
bootstrap5.css
.list-group-item-danger.list-group-item-action:hover,
.list-group-item-danger.list-group-item-action:focus {
color: #721c24;
background-color: #f1b0b7;
}
bootstrap5.css
.list-group-item-danger.list-group-item-action.active {
color: #fff;
background-color: #721c24;
border-color: #721c24;
}
bootstrap5.css
.list-group-item-light {
color: #818182;
background-color: #fdfdfe;
}
bootstrap5.css
.list-group-item-light.list-group-item-action:hover,
.list-group-item-light.list-group-item-action:focus {
color: #818182;
background-color: #ececf6;
}
bootstrap5.css
.list-group-item-light.list-group-item-action.active {
color: #fff;
background-color: #818182;
border-color: #818182;
}
bootstrap5.css
.list-group-item-dark {
color: #1b1e21;
background-color: #c6c8ca;
}
bootstrap5.css
.list-group-item-dark.list-group-item-action:hover,
.list-group-item-dark.list-group-item-action:focus {
color: #1b1e21;
background-color: #b9bbbe;
}
bootstrap5.css
.list-group-item-dark.list-group-item-action.active {
color: #fff;
background-color: #1b1e21;
border-color: #1b1e21;
}
bootstrap5.css
.close {
float: right;
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
opacity: 0.5;
}
bootstrap5.css
.toast {
max-width: 350px;
overflow: hidden;
font-size: 0.875rem;
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
opacity: 0;
border-radius: 0.25rem;
}
bootstrap5.css
.toast:not(:last-child) {
margin-bottom: 0.75rem;
}
bootstrap5.css
.toast-header {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding: 0.25rem 0.75rem;
color: #6c757d;
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
bootstrap5.css
.toast-body {
padding: 0.75rem;
}
bootstrap5.css
.modal-dialog {
position: relative;
width: auto;
margin: 0.5rem;
pointer-events: none;
}
bootstrap5.css
.modal-dialog-scrollable {
display: -ms-flexbox;
display: flex;
max-height: calc(100% - 1rem);
}
bootstrap5.css
.modal-dialog-scrollable .modal-content {
max-height: calc(100vh - 1rem);
overflow: hidden;
}
bootstrap5.css
.modal-dialog-centered {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
min-height: calc(100% - 1rem);
}
bootstrap5.css
.modal-dialog-centered::before {
display: block;
height: calc(100vh - 1rem);
content: "";
}
bootstrap5.css
.modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 0.3rem;
outline: 0;
}
bootstrap5.css
.modal-header {
display: -ms-flexbox;
display: flex;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 1rem 1rem;
border-bottom: 1px solid #dee2e6;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem;
}
bootstrap5.css
.modal-header .close {
padding: 1rem 1rem;
margin: -1rem -1rem -1rem auto;
}
bootstrap5.css
.modal-body {
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1rem;
}
bootstrap5.css
.modal-footer {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: end;
justify-content: flex-end;
padding: 1rem;
border-top: 1px solid #dee2e6;
border-bottom-right-radius: 0.3rem;
border-bottom-left-radius: 0.3rem;
}
bootstrap5.css
.modal-footer > :not(:first-child) {
margin-left: 0.25rem;
}
bootstrap5.css
.modal-footer > :not(:last-child) {
margin-right: 0.25rem;
}
bootstrap5.css
@media (min-width: 576px) {
.modal-dialog {
max-width: 500px;
margin: 1.75rem auto;
}
.modal-dialog-scrollable {
max-height: calc(100% - 3.5rem);
}
.modal-dialog-scrollable .modal-content {
max-height: calc(100vh - 3.5rem);
}
.modal-dialog-centered {
min-height: calc(100% - 3.5rem);
}
.modal-dialog-centered::before {
height: calc(100vh - 3.5rem);
}
.modal-sm {
max-width: 300px;
}
}
bootstrap5.css
.tooltip {
position: absolute;
z-index: 1070;
display: block;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-style: normal;
font-weight: 400;
line-height: 1.5;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
white-space: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
opacity: 0;
}
bootstrap5.css
.tooltip .arrow {
position: absolute;
display: block;
width: 0.8rem;
height: 0.4rem;
}
bootstrap5.css
.bs-tooltip-top,
.bs-tooltip-auto[x-placement^="top"] {
padding: 0.4rem 0;
}
bootstrap5.css
.bs-tooltip-top .arrow,
.bs-tooltip-auto[x-placement^="top"] .arrow {
bottom: 0;
}
bootstrap5.css
.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
top: 0;
border-width: 0.4rem 0.4rem 0;
border-top-color: #000;
}
bootstrap5.css
.bs-tooltip-right,
.bs-tooltip-auto[x-placement^="right"] {
padding: 0 0.4rem;
}
bootstrap5.css
.bs-tooltip-right .arrow,
.bs-tooltip-auto[x-placement^="right"] .arrow {
left: 0;
width: 0.4rem;
height: 0.8rem;
}
bootstrap5.css
.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
right: 0;
border-width: 0.4rem 0.4rem 0.4rem 0;
border-right-color: #000;
}
bootstrap5.css
.bs-tooltip-bottom,
.bs-tooltip-auto[x-placement^="bottom"] {
padding: 0.4rem 0;
}
bootstrap5.css
.bs-tooltip-bottom .arrow,
.bs-tooltip-auto[x-placement^="bottom"] .arrow {
top: 0;
}
bootstrap5.css
.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
bottom: 0;
border-width: 0 0.4rem 0.4rem;
border-bottom-color: #000;
}
bootstrap5.css
.bs-tooltip-left,
.bs-tooltip-auto[x-placement^="left"] {
padding: 0 0.4rem;
}
bootstrap5.css
.bs-tooltip-left .arrow,
.bs-tooltip-auto[x-placement^="left"] .arrow {
right: 0;
width: 0.4rem;
height: 0.8rem;
}
bootstrap5.css
.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
left: 0;
border-width: 0.4rem 0 0.4rem 0.4rem;
border-left-color: #000;
}
bootstrap5.css
.tooltip-inner {
max-width: 200px;
padding: 0.25rem 0.5rem;
color: #fff;
text-align: center;
background-color: #000;
border-radius: 0.25rem;
}
bootstrap5.css
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: block;
max-width: 276px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-style: normal;
font-weight: 400;
line-height: 1.5;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
white-space: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 0.3rem;
}
bootstrap5.css
.popover .arrow {
position: absolute;
display: block;
width: 1rem;
height: 0.5rem;
margin: 0 0.3rem;
}
bootstrap5.css
.bs-popover-top,
.bs-popover-auto[x-placement^="top"] {
margin-bottom: 0.5rem;
}
bootstrap5.css
.bs-popover-top > .arrow,
.bs-popover-auto[x-placement^="top"] > .arrow {
bottom: calc((0.5rem + 1px) * -1);
}
bootstrap5.css
.bs-popover-top > .arrow::before,
.bs-popover-auto[x-placement^="top"] > .arrow::before {
bottom: 0;
border-width: 0.5rem 0.5rem 0;
border-top-color: rgba(0, 0, 0, 0.25);
}
bootstrap5.css
.bs-popover-top > .arrow::after,
.bs-popover-auto[x-placement^="top"] > .arrow::after {
bottom: 1px;
border-width: 0.5rem 0.5rem 0;
border-top-color: #fff;
}
bootstrap5.css
.bs-popover-right,
.bs-popover-auto[x-placement^="right"] {
margin-left: 0.5rem;
}
bootstrap5.css
.bs-popover-right > .arrow,
.bs-popover-auto[x-placement^="right"] > .arrow {
left: calc((0.5rem + 1px) * -1);
width: 0.5rem;
height: 1rem;
margin: 0.3rem 0;
}
bootstrap5.css
.bs-popover-right > .arrow::before,
.bs-popover-auto[x-placement^="right"] > .arrow::before {
left: 0;
border-width: 0.5rem 0.5rem 0.5rem 0;
border-right-color: rgba(0, 0, 0, 0.25);
}
bootstrap5.css
.bs-popover-right > .arrow::after,
.bs-popover-auto[x-placement^="right"] > .arrow::after {
left: 1px;
border-width: 0.5rem 0.5rem 0.5rem 0;
border-right-color: #fff;
}
bootstrap5.css
.bs-popover-bottom,
.bs-popover-auto[x-placement^="bottom"] {
margin-top: 0.5rem;
}
bootstrap5.css
.bs-popover-bottom > .arrow,
.bs-popover-auto[x-placement^="bottom"] > .arrow {
top: calc((0.5rem + 1px) * -1);
}
bootstrap5.css
.bs-popover-bottom > .arrow::before,
.bs-popover-auto[x-placement^="bottom"] > .arrow::before {
top: 0;
border-width: 0 0.5rem 0.5rem 0.5rem;
border-bottom-color: rgba(0, 0, 0, 0.25);
}
bootstrap5.css
.bs-popover-bottom > .arrow::after,
.bs-popover-auto[x-placement^="bottom"] > .arrow::after {
top: 1px;
border-width: 0 0.5rem 0.5rem 0.5rem;
border-bottom-color: #fff;
}
bootstrap5.css
.bs-popover-bottom .popover-header::before,
.bs-popover-auto[x-placement^="bottom"] .popover-header::before {
position: absolute;
top: 0;
left: 50%;
display: block;
width: 1rem;
margin-left: -0.5rem;
content: "";
border-bottom: 1px solid #f7f7f7;
}
bootstrap5.css
.bs-popover-left,
.bs-popover-auto[x-placement^="left"] {
margin-right: 0.5rem;
}
bootstrap5.css
.bs-popover-left > .arrow,
.bs-popover-auto[x-placement^="left"] > .arrow {
right: calc((0.5rem + 1px) * -1);
width: 0.5rem;
height: 1rem;
margin: 0.3rem 0;
}
bootstrap5.css
.bs-popover-left > .arrow::before,
.bs-popover-auto[x-placement^="left"] > .arrow::before {
right: 0;
border-width: 0.5rem 0 0.5rem 0.5rem;
border-left-color: rgba(0, 0, 0, 0.25);
}
bootstrap5.css
.bs-popover-left > .arrow::after,
.bs-popover-auto[x-placement^="left"] > .arrow::after {
right: 1px;
border-width: 0.5rem 0 0.5rem 0.5rem;
border-left-color: #fff;
}
bootstrap5.css
.popover-header {
padding: 0.5rem 0.75rem;
margin-bottom: 0;
font-size: 1rem;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-top-left-radius: calc(0.3rem - 1px);
border-top-right-radius: calc(0.3rem - 1px);
}
bootstrap5.css
.popover-header:empty {
display: none;
}
bootstrap5.css
.popover-body {
padding: 0.5rem 0.75rem;
color: #212529;
}
bootstrap5.css
.carousel-item {
position: relative;
display: none;
float: left;
width: 100%;
margin-right: -100%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
transition: -webkit-transform 0.6s ease-in-out;
transition: transform 0.6s ease-in-out;
transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
}
bootstrap5.css
@media (prefers-reduced-motion: reduce) {
.carousel-item {
transition: none;
}
}
bootstrap5.css
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
bootstrap5.css
.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
bootstrap5.css
.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
bootstrap5.css
.carousel-fade .carousel-item {
opacity: 0;
transition-property: opacity;
-webkit-transform: none;
transform: none;
}
bootstrap5.css
.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-left,
.carousel-fade .carousel-item-prev.carousel-item-right {
z-index: 1;
opacity: 1;
}
bootstrap5.css
.carousel-fade .active.carousel-item-left,
.carousel-fade .active.carousel-item-right {
z-index: 0;
opacity: 0;
transition: 0s 0.6s opacity;
}
bootstrap5.css
@media (prefers-reduced-motion: reduce) {
.carousel-fade .active.carousel-item-left,
.carousel-fade .active.carousel-item-right {
transition: none;
}
}
bootstrap5.css
.carousel-control-prev,
.carousel-control-next {
position: absolute;
top: 0;
bottom: 0;
z-index: 1;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
width: 15%;
color: #fff;
text-align: center;
opacity: 0.5;
transition: opacity 0.15s ease;
}
bootstrap5.css
.spinner-border {
display: inline-block;
width: 2rem;
height: 2rem;
vertical-align: text-bottom;
border: 0.25em solid currentColor;
border-right-color: transparent;
border-radius: 50%;
-webkit-animation: spinner-border 0.75s linear infinite;
animation: spinner-border 0.75s linear infinite;
}
bootstrap5.css
.spinner-border-sm {
width: 1rem;
height: 1rem;
border-width: 0.2em;
}
bootstrap5.css
.spinner-grow {
display: inline-block;
width: 2rem;
height: 2rem;
vertical-align: text-bottom;
background-color: currentColor;
border-radius: 50%;
opacity: 0;
-webkit-animation: spinner-grow 0.75s linear infinite;
animation: spinner-grow 0.75s linear infinite;
}
bootstrap5.css
.spinner-grow-sm {
width: 1rem;
height: 1rem;
}
bootstrap5.css
.rounded-sm {
border-radius: 0.2rem !important;
}
bootstrap5.css
.rounded {
border-radius: 0.25rem !important;
}
bootstrap5.css
.rounded-top {
border-top-left-radius: 0.25rem !important;
border-top-right-radius: 0.25rem !important;
}
bootstrap5.css
.rounded-right {
border-top-right-radius: 0.25rem !important;
border-bottom-right-radius: 0.25rem !important;
}
bootstrap5.css
.rounded-bottom {
border-bottom-right-radius: 0.25rem !important;
border-bottom-left-radius: 0.25rem !important;
}
bootstrap5.css
.rounded-left {
border-top-left-radius: 0.25rem !important;
border-bottom-left-radius: 0.25rem !important;
}
bootstrap5.css
.rounded-lg {
border-radius: 0.3rem !important;
}
bootstrap5.css
.rounded-pill {
border-radius: 50rem !important;
}
bootstrap5.css
.embed-responsive {
/* アスペクト比を持つ親要素に iframe のような埋め込みをラップします */
position: relative;
display: block;
width: 100%;
padding: 0;
overflow: hidden;
}
bootstrap5.css
.embed-responsive::before {
display: block;
content: "";
}
bootstrap5.css
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
bootstrap5.css
.embed-responsive-21by9::before {
padding-top: 42.857143%;
}
bootstrap5.css
.embed-responsive-16by9::before {
padding-top: 56.25%;
}
bootstrap5.css
.embed-responsive-4by3::before {
padding-top: 75%;
}
bootstrap5.css
.embed-responsive-1by1::before {
padding-top: 100%;
}
bootstrap5.css
.align-items-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
bootstrap5.css
.align-items-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
bootstrap5.css
.align-items-center {
-ms-flex-align: center !important;
align-items: center !important;
}
bootstrap5.css
.align-items-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
bootstrap5.css
.align-items-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
bootstrap5.css
.align-self-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
bootstrap5.css
.align-self-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
bootstrap5.css
.align-self-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
bootstrap5.css
.align-self-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
bootstrap5.css
.align-self-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
bootstrap5.css
.align-self-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
bootstrap5.css
.shadow-sm {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
bootstrap5.css
.shadow {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
bootstrap5.css
.shadow-lg {
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}
bootstrap5.css
.m-1 {
margin: 0.25rem !important;
}
bootstrap5.css
.mt-1,
.my-1 {
margin-top: 0.25rem !important;
}
bootstrap5.css
.mr-1,
.mx-1 {
margin-right: 0.25rem !important;
}
bootstrap5.css
.mb-1,
.my-1 {
margin-bottom: 0.25rem !important;
}
bootstrap5.css
.ml-1,
.mx-1 {
margin-left: 0.25rem !important;
}
bootstrap5.css
.m-2 {
margin: 0.5rem !important;
}
bootstrap5.css
.mt-2,
.my-2 {
margin-top: 0.5rem !important;
}
bootstrap5.css
.mr-2,
.mx-2 {
margin-right: 0.5rem !important;
}
bootstrap5.css
.mb-2,
.my-2 {
margin-bottom: 0.5rem !important;
}
bootstrap5.css
.ml-2,
.mx-2 {
margin-left: 0.5rem !important;
}
bootstrap5.css
.m-3 {
margin: 1rem !important;
}
bootstrap5.css
.mt-3,
.my-3 {
margin-top: 1rem !important;
}
bootstrap5.css
.mr-3,
.mx-3 {
margin-right: 1rem !important;
}
bootstrap5.css
.mb-3,
.my-3 {
margin-bottom: 1rem !important;
}
bootstrap5.css
.ml-3,
.mx-3 {
margin-left: 1rem !important;
}
bootstrap5.css
.m-4 {
margin: 1.5rem !important;
}
bootstrap5.css
.mt-4,
.my-4 {
margin-top: 1.5rem !important;
}
bootstrap5.css
.mr-4,
.mx-4 {
margin-right: 1.5rem !important;
}
bootstrap5.css
.mb-4,
.my-4 {
margin-bottom: 1.5rem !important;
}
bootstrap5.css
.ml-4,
.mx-4 {
margin-left: 1.5rem !important;
}
bootstrap5.css
.m-5 {
margin: 3rem !important;
}
bootstrap5.css
.mt-5,
.my-5 {
margin-top: 3rem !important;
}
bootstrap5.css
.mr-5,
.mx-5 {
margin-right: 3rem !important;
}
bootstrap5.css
.mb-5,
.my-5 {
margin-bottom: 3rem !important;
}
bootstrap5.css
.ml-5,
.mx-5 {
margin-left: 3rem !important;
}
bootstrap5.css
.p-1 {
padding: 0.25rem !important;
}
bootstrap5.css
.pt-1,
.py-1 {
padding-top: 0.25rem !important;
}
bootstrap5.css
.pr-1,
.px-1 {
padding-right: 0.25rem !important;
}
bootstrap5.css
.pb-1,
.py-1 {
padding-bottom: 0.25rem !important;
}
bootstrap5.css
.pl-1,
.px-1 {
padding-left: 0.25rem !important;
}
bootstrap5.css
.p-2 {
padding: 0.5rem !important;
}
bootstrap5.css
.pt-2,
.py-2 {
padding-top: 0.5rem !important;
}
bootstrap5.css
.pr-2,
.px-2 {
padding-right: 0.5rem !important;
}
bootstrap5.css
.pb-2,
.py-2 {
padding-bottom: 0.5rem !important;
}
bootstrap5.css
.pl-2,
.px-2 {
padding-left: 0.5rem !important;
}
bootstrap5.css
.p-3 {
padding: 1rem !important;
}
bootstrap5.css
.pt-3,
.py-3 {
padding-top: 1rem !important;
}
bootstrap5.css
.pr-3,
.px-3 {
padding-right: 1rem !important;
}
bootstrap5.css
.pb-3,
.py-3 {
padding-bottom: 1rem !important;
}
bootstrap5.css
.pl-3,
.px-3 {
padding-left: 1rem !important;
}
bootstrap5.css
.p-4 {
padding: 1.5rem !important;
}
bootstrap5.css
.pt-4,
.py-4 {
padding-top: 1.5rem !important;
}
bootstrap5.css
.pr-4,
.px-4 {
padding-right: 1.5rem !important;
}
bootstrap5.css
.pb-4,
.py-4 {
padding-bottom: 1.5rem !important;
}
bootstrap5.css
.pl-4,
.px-4 {
padding-left: 1.5rem !important;
}
bootstrap5.css
.p-5 {
padding: 3rem !important;
}
bootstrap5.css
.pt-5,
.py-5 {
padding-top: 3rem !important;
}
bootstrap5.css
.pr-5,
.px-5 {
padding-right: 3rem !important;
}
bootstrap5.css
.pb-5,
.py-5 {
padding-bottom: 3rem !important;
}
bootstrap5.css
.pl-5,
.px-5 {
padding-left: 3rem !important;
}
bootstrap5.css
.m-n1 {
margin: -0.25rem !important;
}
bootstrap5.css
.mt-n1,
.my-n1 {
margin-top: -0.25rem !important;
}
bootstrap5.css
.mr-n1,
.mx-n1 {
margin-right: -0.25rem !important;
}
bootstrap5.css
.mb-n1,
.my-n1 {
margin-bottom: -0.25rem !important;
}
bootstrap5.css
.ml-n1,
.mx-n1 {
margin-left: -0.25rem !important;
}
bootstrap5.css
.m-n2 {
margin: -0.5rem !important;
}
bootstrap5.css
.mt-n2,
.my-n2 {
margin-top: -0.5rem !important;
}
bootstrap5.css
.mr-n2,
.mx-n2 {
margin-right: -0.5rem !important;
}
bootstrap5.css
.mb-n2,
.my-n2 {
margin-bottom: -0.5rem !important;
}
bootstrap5.css
.ml-n2,
.mx-n2 {
margin-left: -0.5rem !important;
}
bootstrap5.css
.m-n3 {
margin: -1rem !important;
}
bootstrap5.css
.mt-n3,
.my-n3 {
margin-top: -1rem !important;
}
bootstrap5.css
.mr-n3,
.mx-n3 {
margin-right: -1rem !important;
}
bootstrap5.css
.mb-n3,
.my-n3 {
margin-bottom: -1rem !important;
}
bootstrap5.css
.ml-n3,
.mx-n3 {
margin-left: -1rem !important;
}
bootstrap5.css
.m-n4 {
margin: -1.5rem !important;
}
bootstrap5.css
.mt-n4,
.my-n4 {
margin-top: -1.5rem !important;
}
bootstrap5.css
.mr-n4,
.mx-n4 {
margin-right: -1.5rem !important;
}
bootstrap5.css
.mb-n4,
.my-n4 {
margin-bottom: -1.5rem !important;
}
bootstrap5.css
.ml-n4,
.mx-n4 {
margin-left: -1.5rem !important;
}
bootstrap5.css
.m-n5 {
margin: -3rem !important;
}
bootstrap5.css
.mt-n5,
.my-n5 {
margin-top: -3rem !important;
}
bootstrap5.css
.mr-n5,
.mx-n5 {
margin-right: -3rem !important;
}
bootstrap5.css
.mb-n5,
.my-n5 {
margin-bottom: -3rem !important;
}
bootstrap5.css
.ml-n5,
.mx-n5 {
margin-left: -3rem !important;
}
html bootstrap5 Sample
垂直整列:align-items-startとalign-items-centerとalign-items-end
col
col
col
col
col
col
col
col
col
<!-- 上寄せ高さは隣接rowで決まる模様 -->
<div class="row align-items-start">
<div class="col">col</div>
<div class="col">col</div>
<div class="col">col</div>
</div>
<div class="row align-items-center">
<div class="col">col</div>
<div class="col">col</div>
<div class="col">col</div>
</div>
<!-- 下寄せ高さは隣接rowで決まる模様 -->
<div class="row align-items-end">
<div class="col">col</div>
<div class="col">col</div>
<div class="col">col</div>
</div>
flexコンテナー内のアイテムの配置/上:align-items-start
flex文字01
flex文字02
flex文字03
<div class="d-flex align-items-start" style="height: 200px">
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/下:align-items-end
flex文字01
flex文字02
flex文字03
<div class="d-flex align-items-end" style="height: 200px">
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/ストレッチ:align-items-stretch
flex文字01
flex文字02
flex文字03
<div class="d-flex align-items-stretch" style="height: 200px">
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/中央:align-items-center
flex文字01
flex文字02
flex文字03
<div class="d-flex align-items-center" style="height: 200px">
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/ベースライン:align-items-baseline
flex文字01
(padding: 2rem)
(padding: 2rem)
flex文字02
(padding: 4rem)
(padding: 4rem)
flex文字03
(padding: 1rem)
(padding: 1rem)
<div class="d-flex align-items-baseline" style="height: 200px">
<!-- paddingも含めて、flaxの大きさが決まる 文字の位置の高さが同じ-->
<div style="padding: 2rem">flex文字01 <br>(padding: 2rem)</div>
<div style="padding: 4rem">flex文字02 <br>(padding: 4rem)</div>
<div style="padding: 1rem">flex文字03 <br>(padding: 1rem)</div>
</div>
カード、画像あり、タイトル、本文、ボタンのセット:card
<!-- カードの枠:card -->
<div class="card" style="max-width: 25rem;">
<!-- レイアウトされる画像:card-img-top -->
<img class="card-img-top" src="https://via.placeholder.com/318x180/FFFF00/000000?text=img" alt="...">
<!-- カード本文:card-body -->
<div class="card-body">
<!-- カードタイトル:card-title -->
<h4 class="card-title">カードのタイトル</h4>
<!-- カードの内容文:card-text -->
<p class="card-text">カードの内容</p>
<a href="#" class="btn btn-primary">ボタン</a>
</div>
</div>
カードの背景色と文字色の設定:text-whiteとbg-primary
背景色、文字色指定なし
カードのタイトル
カードの内容
背景色:bg-primary、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-secondary、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-success、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-danger、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-warning、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-info、文字色:text-white
カードのタイトル
カードの内容
背景色:bg-light
カードのタイトル
カードの内容
カードのヘッダー
カードのタイトル
カードの内容
<div class="card mb-3" style="max-width: 25rem;">
<div class="card-header">背景色、文字色指定なし</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-primary mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-primary、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-secondary mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-secondary、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-success mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-success、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-danger mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-danger、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-warning mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-warning、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-info mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-info、文字色:text-white</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card bg-light mb-3" style="max-width: 25rem;">
<div class="card-header">背景色:bg-light</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<div class="card text-white bg-dark mb-3" style="max-width: 25rem;">
<div class="card-header">カードのヘッダー</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
カードのヘッダとフッターの背景色を変える:bg-transparent
ヘッダー初期設定の背景色
カードのタイトル
カードの内容
ヘッダー背景色の除去:bg-transparent
カードのタイトル
カードの内容
<div class="card mb-3" style="max-width: 25rem;">
<!-- ヘッダとフッターでデフォルトの背景色 -->
<div class="card-header">ヘッダー初期設定の背景色</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
<div class="card-footer">フッター初期設定の背景色</div>
</div>
<div class="card mb-3" style="max-width: 25rem;">
<!-- デフォルトの背景色を変える場合:bg-transparent -->
<div class="card-header bg-transparent">ヘッダー背景色の除去:bg-transparent</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
<div class="card-footer bg-transparent">フッター背景色の除去:bg-transparent</div>
</div>
カードのデフォルトのボーダー色を変更する:border-primary
カードのヘッダー
カードのタイトル
カードの内容
カードのヘッダー
カードのタイトル
カードの内容
<div class="card mb-3" style="max-width: 25rem;">
<div class="card-header">カードのヘッダー</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
<!-- カード枠のボーダー色:青 border-primary -->
<div class="card border-primary mb-3" style="max-width: 25rem;">
<!-- ヘッダーのボーダー色:青 border-primary -->
<div class="card-header border-primary">カードのヘッダー</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
</div>
カードに画像を配置する:card-img-top
カードの内容
<!-- カード上部に画像を配置:card-img-top -->
<div class="card mb-3" style="max-width: 25rem;">
<img class="card-img-top" src="https://via.placeholder.com/318x180/FFFF00/000000?text=.card-img-top" alt="...">
<div class="card-body">
<p class="card-text">カードの内容</p>
</div>
</div>
カードに下画像を配置する:card-img-bottom
カードの内容
<!-- カード下部に画像を配置:card-img-bottom -->
<div class="card" style="max-width: 25rem;">
<div class="card-body">
<p class="card-text">カードの内容</p>
</div>
<img class="card-img-bottom" src="https://via.placeholder.com/318x180/FFFF00/000000?text=.card-img-bottom"
alt="...">
</div>
カード内のボーダーの無いリストグループ:list-group-flush
<div class="card" style="max-width: 25rem;">
<img class="card-img-top" src="https://via.placeholder.com/318x180/FFFF00/000000?text=.card-img-top" alt="image">
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
</div>
<!-- list-group-flushは、ボーダーの無いリストグループ-->
<ul class="list-group list-group-flush">
<li class="list-group-item">リスト01</li>
<li class="list-group-item">リスト02</li>
<li class="list-group-item">リスト03</li>
</ul>
<!-- カードの本文:card-body -->
<div class="card-body">
<a href="#" class="card-link">カード内リンク</a>
<a href="#" class="card-link">カード内リンク</a>
</div>
</div>
カードにピル型ナビゲーションを組み込む:nav-pillsとcard-header-pills
<div class="card">
<div class="card-header">
<!-- ピル型のナビゲーション:card-header-pills -->
<ul class="nav nav-pills card-header-pills">
<li class="nav-item"> <a class="nav-link active" href="#">アクティブ</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">リンク</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">リンク</a> </li>
</ul>
</div>
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p> <a href="#" class="btn btn-primary">ボタン</a>
</div>
</div>
カードにナビゲーションを組み込む:nav-tabs
<div class="card">
<!-- カードのヘッダー -->
<div class="card-header">
<!-- タブ型のナビゲーション:card-header-tabs -->
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
</ul>
</div>
<!-- カードの本文 -->
<div class="card-body">
<h4 class="card-title">カードのタイトル</h4>
<p class="card-text">カードの内容</p>
<a href="#" class="btn btn-primary">ボタン</a>
</div>
</div>
英語を斜体で表示:em
Embed埋め込み/アスペクト比16:9:embed-responsive
<!-- 大きさが自動調整される -->
<!-- アスペクト比を持つ親要素に iframe のような埋め込みをラップします -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/SGqg_ZzThDU?rel=0"
allowfullscreen></iframe>
</div>
リストグループ:list-group
- リスト項目1
- リスト項目2
- リスト項目3
<ul class="list-group">
<li class="list-group-item">リスト項目1</li>
<li class="list-group-item">リスト項目2</li>
<li class="list-group-item">リスト項目3</li>
</ul>
インラインリストグループ:list-inline
- インラインリスト項目
- インラインリスト項目
- インラインリスト項目
<ul class="list-inline">
<li class="list-inline-item">インラインリスト項目</li>
<li class="list-inline-item">インラインリスト項目</li>
<li class="list-inline-item">インラインリスト項目</li>
</ul>
リスト項目をアクティブ状態にする:active
リストグループの背景色:list-group-item-*
- これは「primary」のリスト項目です。
- これは「secondary」のリスト項目です。
- これは「success」のリスト項目です。
- これは「danger」のリスト項目です。
- これは「warning」のリスト項目です。
- これは「info」のリスト項目です。
- これは「light」のリスト項目です。
- これは「dark」のリスト項目です。
- これは「デフォルト」のリスト項目です。
<ul class="list-group">
<li class="list-group-item list-group-item-primary">これは「primary」のリスト項目です。</li>
<li class="list-group-item list-group-item-secondary">これは「secondary」のリスト項目です。</li>
<li class="list-group-item list-group-item-success">これは「success」のリスト項目です。</li>
<li class="list-group-item list-group-item-danger">これは「danger」のリスト項目です。</li>
<li class="list-group-item list-group-item-warning">これは「warning」のリスト項目です。</li>
<li class="list-group-item list-group-item-info">これは「info」のリスト項目です。</li>
<li class="list-group-item list-group-item-light">これは「light」のリスト項目です。</li>
<li class="list-group-item list-group-item-dark">これは「dark」のリスト項目です。</li>
<li class="list-group-item">これは「デフォルト」のリスト項目です。</li>
</ul>
リスト項目を無効状態にする:disabled
バッジ付きリストグループ:badge-pill
- リスト項目1 14
- リスト項目2 2
- リスト項目3 1
<ul class="list-group">
<!-- justify-content-betweenで左と右端にする -->
<!-- align-items-centerで縦整列にする -->
<li class="list-group-item d-flex justify-content-between align-items-center">
リスト項目1
<span class="badge badge-primary badge-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
リスト項目2
<span class="badge badge-primary badge-pill">2</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
リスト項目3
<span class="badge badge-primary badge-pill">1</span>
</li>
</ul>
divとaタグでリストグループ:list-groupとlist-group-item
<!-- サイドメニューでリンクさせる -->
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action">リスト項目1</a>
<a href="#" class="list-group-item list-group-item-action">リスト項目2</a>
<a href="#" class="list-group-item list-group-item-action disabled">リスト項目3</a>
</div>
リストグループ背景色:list-group-item-*
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action list-group-item-primary">これは「primary」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-secondary">これは「secondary」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-success">これは「success」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-danger">これは「danger」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-warning">これは「warning」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-info">これは「info」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-light">これは「light」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-dark">これは「dark」のリスト項目です。</a>
<a href="#" class="list-group-item list-group-item-action">これは「デフォルト」のリスト項目です。</a>
</div>
クラスのリストグループアクティブ状態:active
<!-- activeを付けると、背景色が濃くなる -->
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action list-group-item-primary active">これはアクティブ状態の「primary」。</a>
<a href="#"
class="list-group-item list-group-item-action list-group-item-secondary active">これはアクティブ状態の「secondary」</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-success active">これはアクティブ状態の「success」。</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-danger active">これはアクティブ状態の「danger」</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-warning active">これはアクティブ状態の「warning」</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-info active">これはアクティブ状態の「info」</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-light active">これはアクティブ状態の「light」</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-dark active">これはアクティブ状態の「dark」</a>
<a href="#" class="list-group-item list-group-item-action active">これはアクティブ状態の「デフォルト(何も設定なし)」</a>
</div>
aタグに複数の要素を入れる:list-group-itemとflex-column
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start active">
<!-- justify-content-betweenを使って左右に設置する -->
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">hヘッダ</h5>
<small>smallコンテンツ</small>
</div>
<p class="mb-1">pコンテンツ</p>
<small>smallコンテンツ</small>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">hヘッダ</h5>
<small class="text-muted">smallコンテンツ</small>
</div>
<p class="mb-1">pコンテンツ</p>
<small class="text-muted">smallコンテンツ</small>
</a>
</div>
li 枠なしのリストグループ:list-group-flush
- リスト項目1
- リスト項目2
- リスト項目3
<div>
<ul class="list-group list-group-flush">
<li class="list-group-item">リスト項目1</li>
<li class="list-group-item">リスト項目2</li>
<li class="list-group-item">リスト項目3</li>
</ul>
</div>
ボタンのリストグループ:list-group-item-action
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action">リスト項目1</button>
<button type="button" class="list-group-item list-group-item-action">リスト項目2</button>
<button type="button" class="list-group-item list-group-item-action" disabled>リスト項目3</button>
</div>
ページネーション:pagination
<nav>
<ul class="pagination">
<li class="page-item"><a class="page-link" href="#">前</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">次</a></li>
</ul>
</nav>
ページネーションの配置 中央寄せ:justify-content-center
<nav>
<ul class="pagination justify-content-center">
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">前</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">次</a></li>
</ul>
</nav>
ページネーションの配置 右寄せ:justify-content-end
<nav>
<ul class="pagination justify-content-end">
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">前</a> </li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">次</a></li>
</ul>
</nav>
ページネーションにアイコンを使用する
<nav>
<ul class="pagination">
<li class="page-item"><a class="page-link" href="#" aria-label="前へ"><span aria-hidden="true">«</span><span
class="sr-only">前へ</span></a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#" aria-label="次へ"><span aria-hidden="true">»</span><span
class="sr-only">次へ</span></a></li>
</ul>
</nav>
リンクの無効状態やアクティブ状態を指定する:disabled
<nav>
<ul class="pagination">
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">前</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item active"><a class="page-link" href="#">2 <span class="sr-only">(現ページ)</span></a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">次</a></li>
</ul>
</nav>
ページネーションのサイズ:pagination-lg
<nav>
<ul class="pagination pagination-lg">
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">前</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">次</a></li>
</ul>
</nav>
ページネーションのサイズ:pagination-sm
<nav>
<ul class="pagination pagination-sm">
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">次</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">前</a></li>
</ul>
</nav>
button要素を使用したドロップダウン:dropdownとdata-toggle
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</button>
<!-- ドロップダウンメニュー -->
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
ボタングループに設定するドロップダウン:btn-group
<!-- ボタングループにすると、ドロップダウンメニューのデザインが変わる -->
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
ドロップダウン
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
メニュー項目にbuttonを使用する:dropdown-menu
<div class="dropdown">
<!-- 切り替えボタン -->
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</button>
<!-- ドロップダウンメニュー -->
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<button class="dropdown-item" type="button">メニュー01</button>
<button class="dropdown-item" type="button">メニュー02</button>
<button class="dropdown-item" type="button">メニュー03</button>
</div>
</div>
メニューの位置をボタンと右寄せにする:dropdown-menu-right
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
メニューの位置を右寄せにしたドロップダウン
</button>
<div class="dropdown-menu dropdown-menu-right">
<button class="dropdown-item" type="button">メニュー01</button>
<button class="dropdown-item" type="button">メニュー02</button>
<button class="dropdown-item" type="button">メニュー03</button>
</div>
</div>
切り替えボタンにaタグ要素を使用したドロップダウン:dropdown-toggle
<div class="dropdown">
<!-- 切り替えボタン -->
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
メニュー項目にアクティブの状態を設定する:active
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">ドロップダウン</button>
<!-- ドロップダウンメニュー -->
<div class="dropdown-menu">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item disabled" href="#">メニュー02(無効)</a>
<a class="dropdown-item active" href="#">メニュー03(アクティブ)</a>
</div>
</div>
左側表示のドロップメニュー:dropleft
<div class="container py-5 d-flex justify-content-center">
<!-- 左方向へのドロップ -->
<div class="btn-group dropleft">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">左方向へのドロップ</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
</div>
右側表示のドロップメニュー:dropright
<div class="container py-5 d-flex justify-content-center">
<!-- 右方向へのドロップ -->
<div class="btn-group dropright">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">右方向へのドロップ</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
</div>
上側表示のドロップメニュー:dropup
<div class="container py-5 d-flex justify-content-center">
<!-- 上方向へのドロップ -->
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">上方向へのドロップ</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
</div>
オーバーフロー(枠から飛び出す)を制約する設定:data-boundary
<div class="bg-info text-center" style="width:250px;height:250px;overflow:scroll;">
<br><br><br>
<div class="dropdown">
<!-- ata-boundary="scrollParent"-->
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"
data-boundary="scrollParent">ドロップダウンボタン</button>
<div class="dropdown-menu">
<a href="#" class="dropdown-item">スクロールウィンドウ幅で制約されるドロップダウンメニュー</a>
<a href="#" class="dropdown-item">スクロールウィンドウ幅で制約されるドロップダウンメニュー</a>
<a href="#" class="dropdown-item">スクロールウィンドウ幅で制約されるドロップダウンメニュー</a>
</div>
</div>
</div>
スペースがない場合に、反対側にドロップダウンを表示させる:data-flip
<div class="box" style="overflow: auto">
<br><br><br><br><br>
<div class="dropdown">
<!-- data-flip="true"-->
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-flip="true">ドロップダウンボタン</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">メニュー1</a>
<a class="dropdown-item" href="#">メニュー2</a>
<a class="dropdown-item" href="#">メニュー3</a>
</div>
</div>
</div>
ドロップダウンのオフセット値を設定する:data-offset
<div class="dropdown">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-toggle="dropdown"
data-offset="10,20" aria-haspopup="true" aria-expanded="false">ドロップダウンボタン</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">メニュー1</a>
<a class="dropdown-item" href="#">メニュー2</a>
<a class="dropdown-item" href="#">メニュー3</a>
</div>
</div>
トグルボタンでdivコンテンツに様々な要素を追加する:dropdown-toggleとdropdown-menu
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">ドロップダウン</button>
<!-- divで作成するコンテンツありのメニュー -->
<div class="dropdown-menu">
<h6 class="dropdown-header">ドロップダウンメニューのタイトル</h6>
<form class="px-4 py-3">
<div class="form-group">
<label for="email">メールアドレス</label>
<input type="email" class="form-control" id="email" placeholder="email@example.com">
</div>
<div class="form-group">
<label for="password">パスワード</label>
<input type="password" class="form-control" id="password" placeholder="Password">
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="check">
<label class="form-check-label" for="check"> ログイン情報を記憶 </label>
</div>
<button type="submit" class="btn btn-secondary">ログイン</button>
</form>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#1">初めての方</a>
<a class="dropdown-item" href="#2">パスワードをお忘れの方</a>
</div>
</div>
ドロップダウンにリンクなしの項目を追加する:dropdown-item-text
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">ドロップダウン</button>
<div class="dropdown-menu">
<!-- メニューの説明分など入れたい場合に利用 -->
<span class="dropdown-item-text">非リンクテキスト</span>
<a class="dropdown-item" href="#1">メニュー1</a>
<a class="dropdown-item" href="#2">メニュー2</a>
<a class="dropdown-item" href="#3">メニュー3</a>
</div>
</div>
ドロップダウンで用意されているJSメソッド:dropdpown('toggle')
<!-- ドロップダウン -->
<div class="dropdown">
<!-- 切り替えボタン -->
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownExample" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</button>
<!-- 最初から選択肢を出しておく -->
<div class="dropdown-menu" aria-labelledby="dropdownExample">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
<script>
$(function () {
$('#dropdownExample').dropdown('toggle');
});
</script>
ドロップダウンのオフセット値を設定する:offset
<!-- data-offset="x,y" はメニューの表示位置を右方向に x、下方向に y ずれた位置に表示します。 -->
<div class="dropdown">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">ドロップダウンボタン</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">メニュー1</a>
<a class="dropdown-item" href="#">メニュー2</a>
<a class="dropdown-item" href="#">メニュー3</a>
</div>
</div>
<script>
$(function () {
$('#dropdownMenuButton').dropdown({
offset: '10, 20'
})
});
</script>
スプリットボタン(分割ボタン)のドロップダウン:dropdown-toggle-split
<div class="btn-group">
<button type="button" class="btn btn-secondary">スプリットボタン</button>
<!-- ボタンとメニューを分割して表示する -->
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
</button>
<!-- ドロップダウンメニュー -->
<div class="dropdown-menu">
<a class="dropdown-item" href="#">メニュー01</a>
<a class="dropdown-item" href="#">メニュー02</a>
<a class="dropdown-item" href="#">メニュー03</a>
</div>
</div>
フォームの基本要素:form-groupとform-control
<form>
<div class="form-group">
<!-- 入力要素ごとにform-group、入力エリアはform-control -->
<label for="email1">メールアドレス</label>
<input type="email" class="form-control" id="email1" aria-describedby="emailHelp" placeholder="メールアドレスを入力">
<small id="emailHelp" class="form-text text-muted">キャリアメールは届かない場合があります。</small>
</div>
<div class="form-group">
<label for="password1">パスワード</label>
<input type="password" class="form-control" id="password1" placeholder="パスワードを入力">
</div>
<div class="form-group">
<label for="select1">プルダウンメニューから選んでください</label>
<select class="form-control" id="select1">
<option>メニュー1</option>
<option>メニュー2</option>
<option>メニュー3</option>
<option>メニュー4</option>
<option>メニュー5</option>
</select>
</div>
<!-- 複数選択のプルダウンメニュー -->
<div class="form-group">
<label for="select2">複数選択のプルダウンメニュー</label>
<select multiple class="form-control" id="select2">
<option>複数選択可A</option>
<option>複数選択可B</option>
<option>複数選択可C</option>
<option>複数選択可D</option>
<option>複数選択可E</option>
</select>
</div>
<div class="form-group">
<label for="textarea1">複数行のテキスト入力欄</label>
<textarea class="form-control" id="textarea1" rows="3"></textarea>
</div>
<div class="form-group">
<label for="file1">ファイルを選択</label>
<input type="file" class="form-control-file" id="file1">
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="checkbox01">
<label class="form-check-label" for="">チェックする</label>
</div>
<button type="submit" class="btn btn-primary">送信</button>
</form>
読み取りテキストを、枠を非表示にする:form-control-plaintext
<form>
<div class="form-group row">
<label for="staticEmail" class="col-sm-2 col-form-label">メールアドレス</label>
<div class="col-sm-10">
<!-- inputの枠を表示しない -->
<input type="text" class="form-control-plaintext" readonly id="staticEmail" value="email@example.com">
</div>
</div>
<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">パスワード</label>
<div class="col-sm-10">
<!-- passwordを使うと、入力内容が*として表示される -->
<input type="password" class="form-control" id="inputPassword" placeholder="パスワードを入力">
</div>
</div>
</form>
自動サイズ調整のカラムを作成する:form-rowとcol-auto
<form>
<div class="form-row align-items-center">
<div class="col-auto">
<label class="sr-only" for="inputName">氏名</label>
<input type="text" class="form-control mb-2" id="inputName" placeholder="氏名を入力">
</div>
<div class="col-auto">
<label class="sr-only" for="inputUsername">ユーザーネーム</label>
<div class="input-group mb-2">
<input type="text" class="form-control" id="inputUsername" placeholder="ユーザーネームを入力">
</div>
</div>
<div class="col-auto">
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input" id="check">
<label class="form-check-label" for="check"> チェックする </label>
</div>
</div>
<div class="col-auto">
<button type="submit" class="btn btn-primary mb-2">送信</button>
</div>
</div>
</form>
コンパクトなカラム間隔のフォーム:form-rowとform-groupとcol-md-6
<form>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail">メールアドレス</label>
<input type="email" class="form-control" id="inputEmail" placeholder="メールアドレスを入力">
</div>
<div class="form-group col-md-6">
<label for="inputPassword">パスワード</label>
<input type="password" class="form-control" id="inputPassword" placeholder="パスワードを入力">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputState">国</label>
<select id="inputState" class="form-control">
<option selected>Choose...</option>
<option>...</option>
</select>
</div>
<div class="form-group col-md-2">
<label for="inputZip">郵便番号</label>
<input type="text" class="form-control" id="inputZip">
</div>
<div class="form-group col-md-6">
<label for="inputCity">都道府県</label>
<input type="text" class="form-control" id="inputCity">
</div>
</div>
<div class="form-group">
<label for="inputAddress1">住所1</label>
<input type="text" class="form-control" id="inputAddress1" placeholder="市町村">
</div>
<div class="form-group">
<label for="inputAddress2">住所2</label>
<input type="text" class="form-control" id="inputAddress2" placeholder="マンション名">
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="check">
<label class="form-check-label" for="check">チェックする</label>
</div>
</div>
<button type="submit" class="btn btn-primary">サインイン</button>
</form>
水平配置のフォームを作成する:form-groupとrowとcol
<form>
<div class="form-group row">
<label for="inputEmail" class="col-sm-2 col-form-label">メールアドレス</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail" placeholder="メールアドレスを入力">
</div>
</div>
<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">パスワード</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword" placeholder="パスワードを入力">
</div>
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">ラジオボタン</legend>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="radio" name="radios" id="radios1" value="option1" checked>
<label class="form-check-label" for="radios1">
オプション1
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="radios" id="radios2" value="option2">
<label class="form-check-label" for="radios2">
オプション2
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="radios" id="radios3" value="option3" disabled>
<label class="form-check-label" for="radios3">
オプション3(無効)
</label>
</div>
</div>
</div>
</fieldset>
<div class="form-group row">
<div class="col-sm-2">チェックボックス</div>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="check1">
<label class="form-check-label" for="check1">
チェックする
</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">サインイン</button>
</div>
</div>
</form>
ラベルサイズを調整する:col-form-label-smとform-control-sm
<form>
<div class="form-group row">
<!-- 小サイズのラベル -->
<label for="labelSm" class="col-sm-3 col-form-label col-form-label-sm">小サイズ:col-form-label-sm</label>
<div class="col-sm-9">
<input type="email" class="form-control form-control-sm" id="labelSm" placeholder="form-control-sm">
</div>
</div>
<div class="form-group row">
<!-- 標準サイズのラベル -->
<label for="labelDefault" class="col-sm-3 col-form-label">標準サイズ</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="labelDefault" placeholder="Default size">
</div>
</div>
<div class="form-group row">
<!-- 大サイズのラベル -->
<label for="labelLg" class="col-sm-3 col-form-label col-form-label-lg">大サイズ:col-form-label-lg</label>
<div class="col-sm-9">
<input type="email" class="form-control form-control-lg" id="labelLg" placeholder="form-control-lg">
</div>
</div>
</form>
入力グループ ドロップダウン付きアドオン:input-group-append
<div class="input-group">
<input type="text" class="form-control" aria-label="ドロップダウン付テキスト入力欄">
<div class="input-group-append">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">アクション</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
<a class="dropdown-item" href="#">リンク3</a>
</div>
</div>
</div>
入力グループ スプリットボタン付きアドオン:input-group-append
<div class="input-group">
<input type="text" class="form-control" aria-label="スプリットボタン付テキスト入力欄">
<div class="input-group-append">
<button type="button" class="btn btn-secondary">アクション</button>
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="sr-only">ドロップダウン切替</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
<a class="dropdown-item" href="#">リンク3</a>
</div>
</div>
</div>
フォームバリデーション:novalidate
<form class="needs-validation" novalidate>
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validation01">姓</label>
<input type="text" class="form-control" id="validation01" placeholder="First name" value="山田" required>
<div class="valid-feedback">
入力済!
</div>
</div>
<div class="col-md-6 mb-3">
<label for="validation02">名</label>
<input type="text" class="form-control" id="validation02" placeholder="Last name" value="太郎" required>
<div class="valid-feedback">
入力済!
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validation03">市町村</label>
<input type="text" class="form-control" id="validation03" placeholder="市町村名を入力" required>
<div class="invalid-feedback">
市町村名を入力してください
</div>
</div>
<div class="col-md-3 mb-3">
<label for="validation04">都道府県</label>
<input type="text" class="form-control" id="validation04" placeholder="都道府県名を入力" required>
<div class="invalid-feedback">
都道府県名を入力してください
</div>
</div>
<div class="col-md-3 mb-3">
<label for="validation05">郵便番号</label>
<input type="text" class="form-control" id="validation05" placeholder="郵便番号を入力" required>
<div class="invalid-feedback">
郵便番号を入力してください
</div>
</div>
</div>
<button class="btn btn-primary" type="submit">送信する</button>
</form>
<!-- 無効な入力がある場合にフォームの送信を無効にする -->
<script>
(function () {
'use strict';
window.addEventListener('load', function () {
// Bootstrapのフォームの入力検証スタイルを適用するフォームを取得
var forms = document.getElementsByClassName('needs-validation');
// ループして帰順を防ぐ
var validation = Array.prototype.filter.call(forms, function (form) {
form.addEventListener('submit', function (event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
ツールチップJS:valid-tooltip
<!-- マウスオンで説明文を表示する -->
<form class="needs-validation" novalidate>
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validation01">姓</label>
<input type="text" class="form-control" id="validation01" placeholder="First name" value="山田" required>
<div class="valid-tooltip"> 入力済! </div>
</div>
<div class="col-md-6 mb-3">
<label for="validation02">名</label>
<input type="text" class="form-control" id="validation02" placeholder="Last name" value="太郎" required>
<div class="valid-tooltip"> 入力済! </div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validation03">市町村</label>
<input type="text" class="form-control" id="validation03" placeholder="市町村名を入力" required>
<div class="invalid-tooltip"> 市町村名を入力してください </div>
</div>
<div class="col-md-3 mb-3">
<label for="validation04">都道府県</label>
<input type="text" class="form-control" id="validation04" placeholder="都道府県名を入力" required>
<div class="invalid-tooltip"> 都道府県名を入力してください </div>
</div>
<div class="col-md-3 mb-3">
<label for="validation05">郵便番号</label>
<input type="text" class="form-control" id="validation05" placeholder="郵便番号を入力" required>
<div class="invalid-tooltip"> 郵便番号を入力してください </div>
</div>
</div>
<button class="btn btn-primary" type="submit">送信する</button>
</form>
<!-- 無効な入力がある場合にフォームの送信を無効にする -->
<script>
(function () {
'use strict';
window.addEventListener('load', function () {
// Bootstrapのフォームの入力検証スタイルを適用するフォームを取得
var forms = document.getElementsByClassName('needs-validation');
// ループして帰順を防ぐ
var validation = Array.prototype.filter.call(forms, function (form) {
form.addEventListener('submit', function (event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
ドロップダウンメニュー:data-toggleとdropdown
<!-- .dropdown, .dropdown-toggle, data-toggle="dropdown", .dropdown-menu, .dropdown-item を組み合わせてドロップダウンメニューを作成する -->
<div class="btn-group" role="group" aria-label="ドロップダウンを含むボタングループ">
<button type="button" class="btn btn-secondary">1</button>
<div class="btn-group" role="group">
<button id="dropmenu1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</button>
<div class="dropdown-menu" aria-labelledby="dropmenu1">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
</div>
</div>
</div>
垂直方向ボタングループ:btn-group-vertical
<div class="btn-group-vertical" role="group" aria-label="ドロップダウンを含むボタングループ">
<button type="button" class="btn btn-secondary">上ボタン</button>
<button type="button" class="btn btn-secondary">中ボタン</button>
<div class="btn-group" role="group">
<button id="drop2" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウン
</button>
<div class="dropdown-menu" aria-labelledby="drop2">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
</div>
</div>
<button type="button" class="btn btn-secondary">下ボタン</button>
</div>
タブとタブパネル:navとnav-tabsとtab-contentとtab-pane
ホームのコンテンツ
プロフィールのコンテンツ
コンタクトのコンテンツ
<!-- タブ部分 -->
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item"><a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab"
aria-controls="home" aria-selected="true">ホーム</a></li>
<li class="nav-item"><a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab"
aria-controls="profile" aria-selected="false">プロフィール</a></li>
<li class="nav-item"><a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab"
aria-controls="contact" aria-selected="false">コンタクト</a></li>
</ul>
<!-- パネル部分 -->
<!-- herfの#とidで切り替える -->
<div class="tab-content mt-3" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">ホームのコンテンツ</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">プロフィールのコンテンツ</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">コンタクトのコンテンツ</div>
</div>
タブ型ナビゲーション(JavaScript経由):thisとtabとshow
ホームのコンテンツが入ります。
プロフィールのコンテンツが入ります。
コンタクトのコンテンツが入ります。
<ul class="nav nav-tabs" id="myTab_js" role="tablist">
<li class="nav-item"><a class="nav-link active" id="home-tab" href="#home_js" role="tab" aria-controls="home"
aria-selected="true">ホーム</a></li>
<li class="nav-item"><a class="nav-link" id="profile-tab" href="#profile_js" role="tab" aria-controls="profile"
aria-selected="false">プロフィール</a></li>
<li class="nav-item"><a class="nav-link" id="contact-tab" href="#contact_js" role="tab" aria-controls="contact"
aria-selected="false">コンタクト</a></li>
</ul>
<!-- パネル部分 -->
<div class="tab-content mt-3" id="myTabContent">
<div class="tab-pane fade show active" id="home_js" role="tabpanel" aria-labelledby="home-tab">ホームのコンテンツが入ります。</div>
<div class="tab-pane fade" id="profile_js" role="tabpanel" aria-labelledby="profile-tab">プロフィールのコンテンツが入ります。</div>
<div class="tab-pane fade" id="contact_js" role="tabpanel" aria-labelledby="contact-tab">コンタクトのコンテンツが入ります。</div>
</div>
<script>
$('#myTab_js a').on('click', function (e) {
// 本来のaの通常処理をしない
e.preventDefault()
$(this).tab('show')
})
</script>
ナビゲーションバー基本:navbarとnavbar-brandとcollapse
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<!-- TOPは常に表示 -->
<a class="navbar-brand" href="#">TOP</a>
<!-- navbar-togglerでレスポンシブ -->
<!-- レスポンシブ状態でないと、トグルアイコンは非表示になり、メニューが表示される -->
<!-- レスポンシブになると、トグルアイコンが表示され、メニューは非表示になる -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarNav2"
aria-controls="navbarNav2" aria-expanded="false" aria-label="ナビゲーションの切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav2">
<!-- メニューはulとliを使う -->
<ul class="navbar-nav">
<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>
</div>
</nav>
ナビバーとコンテナ:container
コンテンツcontainer
コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">TOP</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarNav22"
aria-controls="navbarNav2" aria-expanded="false" aria-label="ナビゲーションの切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav22">
<ul class="navbar-nav">
<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>
</div>
</div>
</nav>
<!-- ここから、コンテンツが始まる -->
<div class="container bg-light">
<h4>コンテンツcontainer</h4>
<p>
コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。コンテナの幅が分かりやすいよう背景色を付けています。
</p>
</div>
ナビバーの検索窓:form-inline
<nav class="navbar navbar-expand navbar-dark bg-dark">
<!-- 画面が狭い時はアイコン、画面が広い時メニューを表示 -->
<a class="navbar-brand" href="#">TOP</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active"><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-light my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>
ナビゲーションドロップダウンメニュー:dropdown-toggle
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">ブランド</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<!-- dropdown-toggleを使う -->
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenu" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
ドロップダウンメニュー
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenu">
<a class="dropdown-item" href="#">サブメニュー1</a>
<a class="dropdown-item" href="#">サブメニュー2</a>
<a class="dropdown-item" href="#">サブメニュー3</a>
</div>
</li>
<li class="nav-item active"><a class="nav-link" href="#">メニュー1</a></li>
<li class="nav-item active"><a class="nav-link" href="#">メニュー2</a></li>
<li class="nav-item"><a class="nav-link" href="#">メニュー3</a></li>
</ul>
</div>
</nav>
ナビゲーションバー内テキスト:navbar-text
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">ブランド</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="ナビゲーションの切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav">
<li class="nav-item active"><a class="nav-link" href="#">ホーム </a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク1</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク2</a></li>
</ul>
<!-- ナビバー内にテキストを表示したい場合 -->
<span class="navbar-text ml-auto">ナビゲーションバーテキスト</span>
</div>
</nav>
ピル型ナビゲーション:nav-pills
ナビゲ―ション項目の幅を調整:nav-fill
ナビゲ―ション項目の幅を調整:nav-justified
<!-- 幅に合わせる、収まらない場合は高さが変わる -->
<nav class="nav nav-pills nav-justified">
<a class="nav-item nav-link active" href="#">リンク1</a>
<a class="nav-item nav-link" href="#">リンク2</a>
<a class="nav-item nav-link active" href="#">長いテキストリンク</a>
<a class="nav-item nav-link" href="#">リンク3</a>
</nav>
ピル型ナビゲーションドロップダウン:nav-linkとdropdown-toggle
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">ドロップダウン</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
<a class="dropdown-item" href="#">リンク3</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">その他リンク</a>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link disabled" href="#">無効</a></li>
</ul>
タブ型ナビゲーション:nav-tabs
タブ型ナビゲーションドロップダウン:dropdown-toggle
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">ドロップダウン</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">リンク1</a>
<a class="dropdown-item" href="#">リンク2</a>
<a class="dropdown-item" href="#">リンク3</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">その他リンク</a>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link disabled" href="#">無効</a></li>
</ul>
ナビゲーションバー 切替ボタンを左寄せに表示:mr-auto
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav02"
aria-controls="navbarNav02" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">ブランド</a>
<div class="collapse navbar-collapse" id="navbarNav02">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active"><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-light my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>
ナビゲーションバーアイコンしか出さない
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<!-- navbar-brand -->
<a class="navbar-brand" href="#">TOP</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav2"
aria-controls="navbarNav2" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav2">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active"><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-light my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>
ブランドの表示・非表示 ブランドを折り畳んで隠すナビゲーションバ
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<a class="navbar-brand" href="#">ブランドを隠す</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active"><a class="nav-link" href="#">リンク1<span class="sr-only">(現位置)</span></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-light my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>
ナビバーのデザイン:navbar-darkとbg-dark
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">ブランド</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<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>
<!-- アウトラインの検索ボタン、darkだど映える -->
<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-info my-2 my-sm-0" type="submit">検索</button>
</form>
</div>
</nav>
ナビバーのデザイン:navbar-darkとbg-primary
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="#">ブランド</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent2"
aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="ナビゲーション切替">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent2">
<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>
</div>
</nav>
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>
ナビゲーション:navとnav-itemとnav-link
ナビゲーション中央寄せ:justify-content-center
<ul class="nav justify-content-center">
<!-- 中央寄せ -->
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link disabled" href="#">無効</a></li>
</ul>
ナビゲーション右寄せ:justify-content-end
<ul class="nav justify-content-end">
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link disabled" href="#">無効</a></li>
</ul>
ナビゲーションを垂直(縦)に並べる:flex-column
<!-- サイドメニューで使える -->
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link active" href="#">アクティブ</a></li>
<li class="nav-item"><a class="nav-link" href="#">リンク</a></li>
<li class="nav-item"><a class="nav-link disabled" href="#">無効</a></li>
</ul>
コンポーネントパンくずリスト:breadcrumb:breadcrumb-item
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">ホーム</a></li>
<li class="breadcrumb-item"><a href="#">ライブラリー</a></li>
<li class="breadcrumb-item active" aria-current="page">データ</li>
</ol>
</nav>
プログレスバー:progressとprogress-barとw-50
<!-- divで、progressとprogress-barの組み合わせで実装する -->
<!-- 進捗度は、aria-valuenowの値を変える -->
<div class="progress mb-3">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar" style="width: 20%" role="progressbar" aria-valuenow="25" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar" style="width: 80%" role="progressbar" aria-valuenow="75" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar w-100" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
プログレスバーの色:progress-barとbg-*
<div class="progress mb-3">
<div class="bg-warning text-dark">progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0"
aria-valuemax="100"></div>
<div class="bg-warning text-dark">progress-bar bg-info" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100"></div>
<div class="bg-warning text-dark">progress-bar bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0"
aria-valuemax="100"></div>
<div class="bg-warning text-dark">progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
20pxの太さのプログレスバー:style
プログレスバーにテキストラベルを追加する
複数のプログレスバーを積み重ねる
<div class="progress" style="height: 20px;">
<div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0"
aria-valuemax="100"></div>
<div class="progress-bar bg-success" role="progressbar" style="width: 30%" aria-valuenow="30" aria-valuemin="0"
aria-valuemax="100"></div>
<div class="progress-bar bg-info" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100"></div>
</div>
プログレスバーをストライプにする:progress-bar-striped
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped" role="progressbar" style="width: 10%" aria-valuenow="10"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 25%" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped bg-info" role="progressbar" style="width: 50%" aria-valuenow="50"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped bg-warning" role="progressbar" style="width: 75%" aria-valuenow="75"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
プログレスバーのアニメーションさせる:progress-bar-animated
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100" style="width: 25%"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped progress-bar-animated bg-info" role="progressbar" aria-valuenow="75"
aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
</div>
<div class="progress mb-3">
<div class="progress-bar progress-bar-striped progress-bar-animated bg-danger" role="progressbar"
aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
</div>
カルーセル基本的な使用例:carouselとcarousel-innerとcarousel-item
<div class="container">
<!-- 複数の画像を用意して、回転木馬のように自動で切り替えていく -->
<!-- slideさせていく -->
<div class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" alt="First slide"
src="https://via.placeholder.com/1600x900/FFFF00/000000?text=First slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" alt="Second slide"
src="https://via.placeholder.com/1600x900/FFFF00/000000?text=Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" alt="Third slide"
src="https://via.placeholder.com/1600x900/FFFF00/000000?text=Third slide">
</div>
</div>
</div>
</div>
インジケータ、タイトル、キャプション付きカルーセル:carousel-indicatorsとcarousel-control-prev
<div id="carouselSample" class="carousel slide" data-ride="carousel">
<!-- インジケーターによるフェード遷移(好きな場所にクリックでいける) -->
<ol class="carousel-indicators">
<li data-target="#carouselSample" data-slide-to="0" class="active"></li>
<li data-target="#carouselSample" data-slide-to="1"></li>
<li data-target="#carouselSample" data-slide-to="2"></li>
</ol>
<!-- カルーセル部分 -->
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" slide"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=First slide">
<div class="carousel-caption d-none d-md-block">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Second slide">
<div class="carousel-caption d-none d-md-block">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Third slide">
<div class="carousel-caption d-none d-md-block">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
</div>
<!-- コントローラー部分 -->
<!-- 前と次のアイコン付きカルーセル -->
<a class="carousel-control-prev" href="#carouselSample" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">前に戻る</span>
</a>
<a class="carousel-control-next" href="#carouselSample" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">次に送る</span>
</a>
</div>
カルーセルのJSイベント:slid.bs.carousel
<div class="container">
<div id="carouselExample" class="carousel slide">
<!-- インジケーター部分 -->
<ol class="carousel-indicators">
<li data-target="#carouselExample" data-slide-to="0" class="active"></li>
<li data-target="#carouselExample" data-slide-to="1"></li>
<li data-target="#carouselExample" data-slide-to="2"></li>
</ol>
<!-- カルーセル部分 -->
<div class="carousel-inner">
<div class="carousel-item active"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=First slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Second slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Third slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
</div>
<!-- コントローラー部分 -->
<a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">前に戻る</span>
</a>
<a class="carousel-control-next" href="#carouselExample" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">次に送る</span>
</a>
</div>
</div>
<script>
$('#carouselExample').on('slide.bs.carousel', function () {
$('#carouselExample .carousel-caption').hide();
});
$('#carouselExample').on('slid.bs.carousel', function () {
$('#carouselExample .carousel-caption').show();
});
</script>
カルーセルをJavaScript経由で呼び出す
<div class="container">
<div id="carouselExample2" class="carousel slide">
<!-- data-ride="carousel"は不要 -->
<!-- インジケーター部分 -->
<ol class="carousel-indicators">
<li data-target="#carouselExample" data-slide-to="0" class="active"></li>
<li data-target="#carouselExample" data-slide-to="1"></li>
<li data-target="#carouselExample" data-slide-to="2"></li>
</ol>
<!-- カルーセル部分 -->
<div class="carousel-inner">
<!-- First slide -->
<div class="carousel-item active"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=First slide">
<div class="carousel-caption">
<h5>スライドタイトル1</h5>
<p>スライドのキャプション</p>
</div>
</div>
<!-- Second slide -->
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Second slide">
<div class="carousel-caption">
<h5>スライドタイトル2</h5>
<p>スライドのキャプション</p>
</div>
</div>
<!-- Third slide -->
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Third slide">
<div class="carousel-caption">
<h5>スライドタイトル3</h5>
<p>スライドのキャプション</p>
</div>
</div>
</div>
<!-- 前に戻るアイコン -->
<a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">前に戻る</span>
</a>
<!-- 次に送るアイコン -->
<a class="carousel-control-next" href="#carouselExample2" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">次に送る</span>
</a>
</div>
</div>
<script>
$(function () {
$('#carouselExample2').carousel();
});
</script>
コントローラー付きカルーセルJS:carousel
<div class="container">
<div id="carousel" class="carousel slide">
<div class="carousel-inner">
<!-- First slide -->
<div class="carousel-item active">
<img class="d-block w-100" alt="First slide"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=First slide">
</div>
<!-- Second slide -->
<div class="carousel-item">
<img class="d-block w-100" alt="Second slide"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Second slide">
</div>
<!-- Third slide -->
<div class="carousel-item">
<img class="d-block w-100" alt="Third slide"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Third slide">
</div>
</div>
<!-- 前に戻るアイコン -->
<a class="carousel-control-prev" href="#carouselIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">前に戻る</span>
</a>
<!-- 次に送るアイコン -->
<a class="carousel-control-next" href="#carouselIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">次に送る</span>
</a>
</div>
<!-- コントロールボタン -->
<div class="control-buttons my-3">
<input type="button" class="btn btn-primary start-slide" value="開始">
<input type="button" class="btn btn-primary pause-slide" value="停止">
<input type="button" class="btn btn-primary prev-slide" value="前へ">
<input type="button" class="btn btn-primary next-slide" value="次へ">
<input type="button" class="btn btn-primary slide-first" value="第1スライドに">
<input type="button" class="btn btn-primary slide-second" value="第2スライドに">
<input type="button" class="btn btn-primary slide-third" value="第3スライドに">
</div>
</div>
<script>
$(function () {
// 循環開始
$(".start-slide").on('click', function () {
$("#carousel").carousel('cycle');
});
// 一時停止
$(".pause-slide").on('click', function () {
$("#carousel").carousel('pause');
});
// 前へ循環
$(".prev-slide").on('click', function () {
$("#carousel").carousel('prev');
});
// 次へ循環
$(".next-slide").on('click', function () {
$("#carousel").carousel('next');
});
// 特定のフレームに循環
$(".slide-first").on('click', function () {
$("#carousel").carousel(0);
});
$(".slide-second").on('click', function () {
$("#carousel").carousel(1);
});
$(".slide-third").on('click', function () {
$("#carousel").carousel(2);
});
});
</script>
データ属性でオプションを指定:data-interval
<div class="container">
<!-- intervalの設定 -->
<div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="3000">
<ol class="carousel-indicators">
<li data-target="#carouselExample" data-slide-to="0" class="active"></li>
<li data-target="#carouselExample" data-slide-to="1"></li>
<li data-target="#carouselExample" data-slide-to="2"></li>
</ol>
<!-- カルーセル部分 -->
<div class="carousel-inner">
<!-- First slide -->
<div class="carousel-item active"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=First slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<!-- Second slide -->
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Second slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
<!-- Third slide -->
<div class="carousel-item"> <img class="d-block w-100" alt="img"
src="https://via.placeholder.com/1600x900/666666/FFFF00/000000?text=Third slide">
<div class="carousel-caption">
<h5>スライドタイトル</h5>
<p>スライドのキャプション</p>
</div>
</div>
</div>
<!-- 前に戻るアイコン -->
<a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">前に戻る</span>
</a>
<!-- 次に送るアイコン -->
<a class="carousel-control-next" href="#carouselExample" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">次に送る</span>
</a>
</div>
</div>
モーダル 表示ボタン、外枠(非表示)、本体、コンテンツ、閉じるボタンの5点セット
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#exampleModal">モーダルボタン</button>
<div class="modal" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
モーダルの本文が入ります。
</div>
<div class="modal-footer">
<!-- 「data-dismiss=”modal”」が閉じる動作 -->
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
モーダルのアニメーション設定:fade
<div class="container">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#exampleModal">モーダルボタン</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
モーダルの本文が入ります。
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
</div>
垂直方向中央に配置するモーダル:modal-dialog-centered
<div class="container">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#exampleModal">モーダルボタン</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<!-- モーダルの×ボタン -->
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
モーダルの本文が入ります。
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
</div>
<style>
.row>.col,
.row>[class^=col-] {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
background-color: rgba(0, 0, 0, .1);
border: 1px solid #aaa;
}
</style>
グリッドレイアウトを使用したモーダル:rowとcol
<div class="container">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#exampleModal">モーダルボタン</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">col-md-4</div>
<div class="col-md-4 ml-auto">col-md-4、ml-auto</div>
</div>
<div class="row">
<div class="col-md-3 ml-auto">col-md-3、ml-auto</div>
<div class="col-md-2 ml-auto">col-md-2、ml-auto</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
</div>
長いコンテンツのモーダル:modal-body
<div class="container">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#exampleModal">モーダルボタン</button>
<!-- モーダルウィンドウ外枠 -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<!-- モーダルのダイアログ本体 -->
<div class="modal-dialog" role="document">
<!-- モーダルのコンテンツ -->
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
<p>モーダル本文</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
</div>
大きなサイズのモーダル サイズのオプション:modal-lg
<div class="container">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#largeModal">モーダルボタン</button>
<!-- モーダル -->
<div class="modal fade" id="largeModal" tabindex="-1" role="dialog" aria-labelledby="largeModalLabel"
aria-hidden="true">
<!-- 大きなモーダルのダイアログ本体modal-lg -->
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="largeModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span
aria-hidden="true">×</span></button>
</div>
<div class="modal-body">モーダルの本文</div>
<!-- モーダルのフッター -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
</div>
</div>
</div>
</div>
モーダル:JavaScript使用
<div class="container">
<p class="text-center"><button type="button" class="btn btn-primary">モーダルボタン</button></p>
<!-- モーダル -->
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<!-- モーダルのダイアログ本体 -->
<div class="modal-dialog" role="document">
<!-- モーダルのコンテンツ -->
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">モーダルのタイトル</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span
aria-hidden="true">×</span> </button>
</div>
<div class="modal-body">モーダルの本文</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
<button type="button" class="btn btn-primary">変更を保存</button>
</div>
</div>
</div>
</div>
</div>
<script>
$('.btn').click(function () {
$('#myModal').modal('show');
});
</script>