Faaali atu meatotino
Fa'atopetope ma fa'afoliga fa'asolo le fa'aaliga taua o vaega ma isi mea fa'atasi ma a tatou fa'aoga fa'aaliga. E aofia ai le lagolago mo nisi o tau masani, faʻapea foʻi ma nisi faʻaopoopoga mo le puleaina o faʻaaliga pe a lolomi.
Suia le tau o le display
mea totino i a matou vasega faʻaalia faʻaalia. Matou te lagolagoina ma le loto i ai na'o se vaega itiiti o mea taua uma e mafai mo display
. E mafai ona tu'ufa'atasia vasega mo a'afiaga eseese e te mana'omia.
Fa'aali vasega fa'aoga e fa'atatau i va'aiga uma , mai xs
i le xl
, e leai se fa'apu'upu'u va'aiga i totonu. E mafua ona o na vasega o loʻo faʻaoga mai min-width: 0;
ma luga, ma o lea e le o noatia i se fesili a le aufaasālalau. Ae peitai, o vaega o totoe, e aofia ai se faapuupuuga.
E pei o lea, ua faaigoaina vasega e faʻaaoga ai le faatulagaga:
.d-{value}
moxs
.d-{breakpoint}-{value}
mosm
,md
,lg
maxl
.
Ole tau ole tasi ole:
none
inline
inline-block
block
table
table-cell
table-row
flex
inline-flex
O fesili fa'asalalau e fa'aaafia ai le lautele o lau fa'atasi ma le va'aiga ua tu'uina atu pe lapopoa . Mo se faʻataʻitaʻiga, .d-lg-none
seti display: none;
i luga o le lua lg
ma xl
lau.
<div class="d-inline p-2 bg-primary text-white">d-inline</div>
<div class="d-inline p-2 bg-dark text-white">d-inline</div>
<span class="d-block p-2 bg-primary text-white">d-block</span>
<span class="d-block p-2 bg-dark text-white">d-block</span>
Mo le televave o le atinaʻeina o fesoʻotaʻiga feaveaʻi, faʻaaoga vasega faʻaalia tali mo le faʻaalia ma le nanaina o elemene i masini. Aloese mai le faia o ni fa'aliliuga 'ese'ese atoa o le 'upega tafa'ilagi e tasi, nai lo le natia o elemene fa'afoliga mo lau mata ta'itasi.
Ina ia nana elemene na o le faʻaaogaina o le .d-none
vasega poʻo se tasi o .d-{sm,md,lg,xl}-none
vasega mo soʻo se fesuiaiga o lau tali.
Ina ia faʻaalia se elemene i luga o se vaeluaga o le tele o lau e mafai ona e tuʻufaʻatasia le tasi .d-*-none
vasega ma se .d-*-*
vasega, mo se faʻataʻitaʻiga .d-none .d-md-block .d-xl-none
o le a natia ai le elemene mo lapopoa uma sei vagana ai luga o masini feololo ma tetele.
Tele lau | Vasega |
---|---|
Natia i mea uma | .d-none |
Natia na'o le xs | .d-none .d-sm-block |
Natia i luga ole sm | .d-sm-none .d-md-block |
Natia na'o le md | .d-md-none .d-lg-block |
Natia i luga ole lg | .d-lg-none .d-xl-block |
Natia na'o le xl | .d-xl-none |
Va'aia i tagata uma | .d-block |
E na'o le xs e iloa ai | .d-block .d-sm-none |
E na'o le sm | .d-none .d-sm-block .d-md-none |
E na'o le md | .d-none .d-md-block .d-lg-none |
E na'o le lg | .d-none .d-lg-block .d-xl-none |
Na'o le xl e iloa ai | .d-none .d-xl-block |
<div class="d-lg-none">hide on screens wider than lg</div>
<div class="d-none d-lg-block">hide on screens smaller than lg</div>
Suia le display
taua o elemene pe a lolomi ma a matou vasega faʻaaliga faʻaalia lomitusi. E aofia ai le lagolago mo display
tulaga tutusa ma a tatou .d-*
mea faʻaoga tali.
.d-print-none
.d-print-inline
.d-print-inline-block
.d-print-block
.d-print-table
.d-print-table-row
.d-print-table-cell
.d-print-flex
.d-print-inline-flex
E mafai ona tu'ufa'atasia vasega lolomi ma fa'aaliga.
<div class="d-print-none">Screen Only (Hide on print only)</div>
<div class="d-none d-print-block">Print Only (Hide on screen only)</div>
<div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div>