Components (1): Alerts / Badges / Breadcrumb
div.alert.alert-(primary|secondary|success|danger|warning|info|light|dark)
Attribute
role="alert"
h(1|2|3|...).alert-heading
a.alert-link
div.alert.alert-primary
div.alert.alert-secondary
div.alert.alert-success
div.alert.alert-danger
div.alert.alert-warning
div.alert.alert-info
div.alert.alert-light
div.alert.alert-dark
Example using various-size headings, paragraphs, and a horizontal rule.
h4.alert-heading
h5.alert-heading
h6.alert-heading
First paragraph p
.
Sesond paragraph p
with bottom margin adjustment mb-0
.
p
, its bottom margin is set to 1rem
(same as .mt-3
) as default (wider than the alert's bottom padding 0.75rem
). Removing the paragraph's bottom margin with mb-0
sets equal top and bottom spacings.div.alert.alert-(primary|secondary|...)
Attribute
.fade.show
button.close
Attributes
type="button"
data-dismiss="alert"
aria-label="Close"
span
Attribute
aria-hidden="true"
×
button.btn.btn-primary
Notifications
span.badge.badge-light
Attribute
ml-2
5
span.sr-only
unread messages
span.badge.badge-(primary|secondary|success|danger|warning|info|light|dark)
Primary Secondary Success Danger Warning Info Light Dark
span.badge.badge-pill.badge-(primary|secondary|success|danger|warning|info|light|dark)
Primary Secondary Success Danger Warning Info Light Dark
a.badge.badge-(primary|secondary|success|danger|warning|info|light|dark)
Primary Secondary Success Danger Warning Info Light Dark
Breadcrumb indicates current page's location within a navigational hierarchy.
Structurenav
Attribute
If you want to change the separator symbol ( "/"
as default), you can append a short CSS as below at the end of head
block (used in this page).
.breadcrumb-item + .breadcrumb-item::before { content: "\00bb" }
(Advanced) you can also customize bootstrap.css from Sass source files. See Customizing from Sass source code for detail.
Finally, below is the real breadcrumb of this page.