Bootstrap 4 kleuren
Tekstkleuren
Bootstrap 4 heeft enkele contextuele klassen die kunnen worden gebruikt om "betekenis door kleuren" te geven.
De klassen voor tekstkleuren zijn: .text-muted
,
.text-primary
, .text-success
, .text-info
,
.text-warning
, .text-danger
, .text-secondary
, .text-white
,
.text-dark
, .text-body
(standaard bodykleur/vaak zwart) en .text-light
:
Voorbeeld
This text is muted.
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
Secondary text.
Dark grey text.
Body text.
Light grey text.
Contextuele tekstklassen kunnen ook worden gebruikt op links, waardoor een donkerdere zweefkleur wordt toegevoegd:
Voorbeeld
U kunt ook 50% dekking toevoegen voor zwarte of witte tekst met de .text-black-50
of .text-white-50
klassen:
Voorbeeld
Black text with 50% opacity on white background
White text with 50% opacity on black background
Achtergrondkleuren
De klassen voor achtergrondkleuren zijn: .bg-primary
,
.bg-success
, .bg-info
, .bg-warning
, .bg-danger
, .bg-secondary
, .bg-dark
en .bg-light
.
Houd er rekening mee dat achtergrondkleuren de tekstkleur niet bepalen, dus in sommige gevallen wil je ze samen met een .text-*
klas gebruiken.
Voorbeeld
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
Secondary background color.
Dark grey background color.
Light grey background color.