Izinsiza zesakhiwo
Ukuze kuthuthukiswe iselula esheshayo futhi esabelayo, i-Bootstrap ifaka inqwaba yamakilasi awusizo ukuze aboniswe, acashwe, aqondaniswe, kanye nokuqukethwe kwezikhala.
Iyashintshadisplay
Sebenzisa izinsiza zethu zokubonisa ukuze uphendule ngokuphendula amanani avamile display
wendawo. Yixube nesistimu yethu yegridi, okuqukethwe, noma izingxenye ukuze uzibonise noma uzifihle kuzo zonke izindawo zokubuka ezithile.
Izinketho ze-Flexbox
I-Bootstrap 4 yakhiwe nge-flexbox, kodwa akuwona wonke ama-elementi display
ashintshiwe ukuze display: flex
abe njengoba lokhu kungangeza ukukhipha okuningi okungadingekile futhi kushintshe ngokungalindelekile ukuziphatha okubalulekile kwesiphequluli. Izingxenye zethu eziningi zakhiwe nge-flexbox enikwe amandla.
Uma kwenzeka udinga ukungeza display: flex
ku-elementi, kwenze lokho .d-flex
noma ngenye yezinhlobonhlobo ezisabelayo (isb, .d-sm-flex
). Uzodinga leli klasi noma display
inani ukuze uvumele ukusetshenziswa kwezinsiza zethu ezengeziwe ze- flexbox zokulinganisa, ukuqondanisa, izikhala, nokuningi.
I-Margin kanye ne-padding
Sebenzisa izinsiza margin
kanye padding
nokubeka izikhala ukuze ulawule ukuthi izakhi nezingxenye zihlukaniswa kanjani nosayizi. I-Bootstrap 4 ihlanganisa isikali samazinga amahlanu sezinsiza zokuhlukanisa izikhala, ngokusekelwe kokuguquguqukayo 1rem
okuzenzakalelayo $spacer
kwevelu. Khetha amanani azo zonke izingosi zokubuka (isb, .mr-3
ze- margin-right: 1rem
), noma khetha okuhlukile okusabelayo ukuze uqondise izimbobo zokubuka ezithile (isb, .mr-md-3
ezokuqala margin-right: 1rem
endaweni md
yokuphumula).
Guqulavisibility
Uma display
ukuguqula kungadingeki, ungakwazi ukuguqula visibility
isici ngezinsiza zethu ezibonakalayo . Izinto ezingabonakali zisazothinta ukwakheka kwekhasi, kodwa zifihliwe ngokubonakalayo ezivakashini.