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 kokushintshashintsha 1rem
kwenani okuzenzakalelayo $spacer
. Khetha amanani azo zonke izingosi zokubuka .mr-3
( margin-right: 1rem
isb ..mr-md-3
margin-right: 1rem
md
Uma display
ukuguqula kungadingeki, ungaguqula visibility
isici ngezinsiza zethu ezibonakalayo . Izinto ezingabonakali zisazothinta ukwakheka kwekhasi, kodwa zifihlekile ezivakashini.