Bootstrap 4 kleure
Teks kleure
Bootstrap 4 het 'n paar kontekstuele klasse wat gebruik kan word om "betekenis deur kleure" te gee.
Die klasse vir tekskleure is: .text-muted
,
.text-primary
, .text-success
, .text-info
,
.text-warning
, .text-danger
, .text-secondary
, .text-white
,
.text-dark
, .text-body
(verstek liggaamskleur/dikwels swart) 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.
Kontekstuele teksklasse kan ook op skakels gebruik word, wat 'n donkerder sweefkleur sal byvoeg:
Voorbeeld
Jy kan ook 50% ondeursigtigheid vir swart of wit teks byvoeg met die .text-black-50
of .text-white-50
klasse:
Voorbeeld
Black text with 50% opacity on white background
White text with 50% opacity on black background
Agtergrond kleure
Die klasse vir agtergrondkleure is: .bg-primary
,
.bg-success
, .bg-info
, .bg-warning
, .bg-danger
, .bg-secondary
, .bg-dark
en .bg-light
.
Let daarop dat agtergrondkleure nie die tekskleur stel nie, so in sommige gevalle sal jy dit saam met 'n .text-*
klas wil gebruik.
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.