height
bootstrap5.css
bootstrap5.css
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
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
hr {
box-sizing: content-box;
height: 0;
/* overflowは、ボックス内に収まらない場合に、はみ出た部分の表示の仕方を指定する */
overflow: visible;
}
bootstrap5.css
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
bootstrap5.css
sub,
sup {
/* 下線付き文字 */
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
bootstrap5.css
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
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
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
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
.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
.img-fluid {
max-width: 100%;
height: auto;
}
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
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
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
.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
select.form-control[size],
select.form-control[multiple] {
height: auto;
}
bootstrap5.css
textarea.form-control {
height: auto;
}
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
.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
.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-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
.collapsing {
position: relative;
height: 0;
/* はみ出た部分は、非表示にする */
/* あえて一部表示で、それ以外は非表示という使い方もする */
overflow: hidden;
transition: height 0.35s ease;
}
bootstrap5.css
.dropdown-divider {
height: 0;
margin: 0.5rem 0;
overflow: hidden;
border-top: 1px solid #e9ecef;
}
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
.custom-control {
position: relative;
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
}
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-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-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-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::-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
.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-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
.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
.pagination-lg .page-link {
padding: 0.75rem 1.5rem;
font-size: 1.25rem;
line-height: 1.5;
}
bootstrap5.css
.pagination-sm .page-link {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
}
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
.progress {
display: -ms-flexbox;
display: flex;
height: 1rem;
overflow: hidden;
font-size: 0.75rem;
background-color: #e9ecef;
border-radius: 0.25rem;
}
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
.modal {
position: fixed;
top: 0;
left: 0;
z-index: 1050;
display: none;
width: 100%;
height: 100%;
overflow: hidden;
outline: 0;
}
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-dialog-centered.modal-dialog-scrollable {
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: center;
justify-content: center;
height: 100%;
}
bootstrap5.css
.modal-dialog-centered.modal-dialog-scrollable .modal-content {
max-height: none;
}
bootstrap5.css
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
z-index: 1040;
width: 100vw;
height: 100vh;
background-color: #000;
}
bootstrap5.css
.modal-title {
margin-bottom: 0;
line-height: 1.5;
}
bootstrap5.css
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
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-right .arrow,
.bs-tooltip-auto[x-placement^="right"] .arrow {
left: 0;
width: 0.4rem;
height: 0.8rem;
}
bootstrap5.css
.bs-tooltip-left .arrow,
.bs-tooltip-auto[x-placement^="left"] .arrow {
right: 0;
width: 0.4rem;
height: 0.8rem;
}
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-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-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
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: 20px;
height: 20px;
background: no-repeat 50% / 100% 100%;
}
bootstrap5.css
.carousel-indicators li {
box-sizing: content-box;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
width: 30px;
height: 3px;
margin-right: 3px;
margin-left: 3px;
text-indent: -999px;
cursor: pointer;
background-color: #fff;
background-clip: padding-box;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
opacity: 0.5;
transition: opacity 0.6s 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
.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
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
bootstrap5.css
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
overflow: visible;
clip: auto;
white-space: normal;
}
bootstrap5.css
.h-25 {
height: 25% !important;
}
bootstrap5.css
.h-50 {
height: 50% !important;
}
bootstrap5.css
.h-75 {
height: 75% !important;
}
bootstrap5.css
.h-100 {
height: 100% !important;
}
bootstrap5.css
.h-auto {
height: auto !important;
}
bootstrap5.css
.mh-100 {
max-height: 100% !important;
}
bootstrap5.css
.min-vh-100 {
min-height: 100vh !important;
}
bootstrap5.css
.vh-100 {
height: 100vh !important;
}
html bootstrap5 Sample
flex文字の伸縮 デフォルト:d-flex
flexの幅を伸縮で埋める機能:flex-grow
flexの幅を縮小で調整する(他を優先):flex-shrink
flex文字01(flex-shrink-1)
flex文字02
flex文字03
<!-- flex文字の幅を縮小で調整する -->
<div class="d-flex" style="height: 100px">
<div class="p-2 flex-shrink-1">flex文字01(flex-shrink-1)</div>
<div class="p-2 w-100">flex文字02</div>
<div class="p-2 w-100">flex文字03</div>
</div>
flex縦の均等配置/トップからスタートする:align-content-start
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
flex文字11
flex文字12
<div class="d-flex align-content-start flex-wrap" style="height: 200px">
<!-- 文字列01が上段の左端からスタートする -->
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
<div>flex文字11</div>
<div>flex文字12</div>
</div>
flex縦の均等配置/高さ固定で、中央寄せ:align-content-center
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
flex文字11
flex文字12
<div class="d-flex align-content-center flex-wrap" style="height: 200px">
<!-- height固定で、中央寄せ -->
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
<div>flex文字11</div>
<div>flex文字12</div>
</div>
flex縦の均等配置/高さ固定で、ボトム詰め:align-content-end
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
flex文字11
flex文字12
<div class="d-flex align-content-end flex-wrap" style="height: 200px">
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
<div>flex文字11</div>
<div>flex文字12</div>
</div>
flex縦の均等配置/高さ固定で、上と下:align-content-between
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
<div class="d-flex align-content-between flex-wrap" style="height: 200px">
<!-- height固定で、上と下 -->
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
</div>
flex縦の均等配置/高さ固定で、行間自動調整:align-content-around
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
<div class="d-flex align-content-around flex-wrap" style="height: 200px">
<!-- height固定で、行間自動調整 -->
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
</div>
flex縦の均等配置/縦の高さも勝手に合わせてくる:align-content-stretch
flex文字01
flex文字02
flex文字03
flex文字04
flex文字05
flex文字06
flex文字07
flex文字08
flex文字09
flex文字10
flex文字11
flex文字12
<div class="d-flex align-content-stretch flex-wrap" style="height: 400px">
<!-- height固定のサイズで、flaxの高さも自動で調整する -->
<div>flex文字01</div>
<div>flex文字02</div>
<div>flex文字03</div>
<div>flex文字04</div>
<div>flex文字05</div>
<div>flex文字06</div>
<div>flex文字07</div>
<div>flex文字08</div>
<div>flex文字09</div>
<div>flex文字10</div>
<div>flex文字11</div>
<div>flex文字12</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>
flexコンテナー内のアイテムの配置/自身ストレッチ:align-self-stretch
flex文字01
flex文字02(align-self-stretch)
flex文字03
<div class="d-flex" style="height: 100px">
<div>flex文字01</div>
<div class="align-self-stretch">flex文字02(align-self-stretch)</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/自身上:align-self-start
flex文字01
flex文字02(align-self-start)
flex文字03
<div class="d-flex" style="height: 100px">
<div>flex文字01</div>
<div class="align-self-start">flex文字02(align-self-start)</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/自身下:align-self-end
flex文字01
flex文字02(align-self-end)
flex文字03
<div class="d-flex" style="height: 100px">
<div>flex文字01</div>
<div class="align-self-end">flex文字02(align-self-end)</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/自身中央:align-self-center
flex文字01
flex文字02(align-self-center)
flex文字03
<div class="d-flex" style="height: 100px">
<div>flex文字01</div>
<div class="align-self-center">flex文字02(align-self-center)</div>
<div>flex文字03</div>
</div>
flexコンテナー内のアイテムの配置/自身ベースライン:align-self-baseline
flex文字01
flex文字02(align-self-baseline)
flex文字03
<div class="d-flex" style="height: 100px">
<div>flex文字01</div>
<div class="align-self-baseline">flex文字02(align-self-baseline)</div>
<div>flex文字03 </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>
navbar-brand画像:navbar-brand
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="#">
<img src="img/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="">
Bootstrap
</a>
</nav>
20pxの太さのプログレスバー:style
プログレスバーにテキストラベルを追加する
<div class="progress" style="height: 20px;">
<!-- divにテキストを書くだけ -->
<div class="progress-bar w-25" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>
複数のプログレスバーを積み重ねる
<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>