Izinsiza zesakhiwo
Ukuze kuthuthukiswe iselula esheshayo futhi esabelayo, i-Bootstrap ifaka inqwaba yamakilasi awusizo ukuze aboniswe, acashwe, aqondaniswe, kanye nokuqukethwe kwezikhala.
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.
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 kufanele wengeze display: flex
ku-elementi, kwenze lokho .d-flex
noma ngeyodwa yezinhlobonhlobo ezisabelayo (isb, .d-sm-flex
). Uzodinga leli klasi noma display
inani ukuze uvumele ukusetshenziswa kwezinsiza zethu ezengeziwe ze- flexbox zokulinganisa, ukuqondanisa, izikhala, nokuningi.
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).
Uma display
ukuguqula kungadingeki, ungakwazi ukuguqula visibility
isici ngezinsiza zethu ezibonakalayo . Izinto ezingabonakali zisazothinta ukwakheka kwekhasi, kodwa zifihliwe ngokubonakalayo ezivakashini.