Dulmar
Qaybaha iyo xulashooyinka dejinta mashruucaaga Bootstrap, oo ay ku jiraan weelasha duubida, nidaam awood badan, shay warbaahin oo dabacsan, iyo fasalo tasiilaad ah.
Konteenarada
Konteenarada ayaa ah sheyga ugu aasaasiga ah ee qaabaynta ee Bootstrap waxaana loo baahan yahay marka la isticmaalayo nidaamkayaga khadka caadiga ah . Weelasha waxaa loo isticmaalaa in lagu daro, suuf, iyo (mararka qaarkood) xuddun u ah waxa ku jira. Iyadoo weelasha buul la dhigi karo, badi qaabaynta uma baahna weel buul leh.
Bootstrap waxay la socotaa saddex weel oo kala duwan:
.container
, kaas oo dejinaya meelmax-width
kasta oo jawaab celin ah.container-fluid
, kaas oowidth: 100%
ah dhammaan meelaha jaban.container-{breakpoint}
, kaas oo ahwidth: 100%
ilaa inta la cayimay goynta
Jadwalka hoose wuxuu muujinayaa sida weel kastaa u max-width
barbar dhigo kan asalka ah .container
iyo .container-fluid
meel kasta oo jaban.
Ficil ku arag iyaga oo ku barbar dhig tusaalahayaga Grid .
Aad u yar <576px |
Yar ≥576px |
Dhexdhexaad ≥768px |
Weyn ≥992px |
Aad u weyn ≥1200px |
|
---|---|---|---|---|---|
.container |
100% | 540px | 720px | 960px | 1140px |
.container-sm |
100% | 540px | 720px | 960px | 1140px |
.container-md |
100% | 100% | 720px | 960px | 1140px |
.container-lg |
100% | 100% | 100% | 960px | 1140px |
.container-xl |
100% | 100% | 100% | 100% | 1140px |
.container-fluid |
100% | 100% | 100% | 100% | 100% |
All-in-one
Fasalkayaga caadiga .container
ah waa jawaab celin, weel ballaadhkiisu go'an yahay, taasoo la macno ah max-width
isbeddelkiisa meel kasta oo nasashada.
Dheecaan
U isticmaal .container-fluid
weel ballac buuxa ah, oo ku dhereraya ballaca goobta daawashada oo dhan.
Ka jawaaba
Weelasha jawaab celinta ayaa ku cusub Bootstrap v4.4. Waxay kuu oggolaanayaan inaad qeexdo fasal 100% ballac ah ilaa barta goynta ee la cayimay laga gaarayo, ka dib waxaan codsaneynaa max-width
s mid kasta oo ka mid ah meelaha sare ee jabinta. Tusaale ahaan, .container-sm
waa 100% ballaaran in la bilaabo ilaa barta sm
goynta laga gaarayo, halkaas oo ay ku kordhin doonto md
, lg
, iyo xl
.
Meelo jaban oo jawaab ah
Maadaama Bootstrap loo hormariyay inuu noqdo mobilka marka hore, waxaan isticmaalnaa dhowr su'aalood oo warbaahin ah si aan u abuurno go'aan macquul ah qaabayntayada iyo isku xidhkayada. Meelahan jaban waxay inta badan ku salaysan yihiin ballaadhka ugu yar ee daawashada waxayna noo ogolaanayaan inaan kor u qaadno walxaha marka muuqaalku isbeddelo.
Bootstrap waxay u isticmaashaa kala duwanaanshaha su'aalaha warbaahinta ee soo socda-ama meelaha jaban-ee ishayada faylasha Sass ee qaabayntayada, nidaamka grid, iyo qaybahayada.
Maadaama aan ku qorno ishayada CSS ee Sass, dhammaan weydiimahayada warbaahinta waxaa laga heli karaa Sass mixins:
Waxaan marmar isticmaalnaa weydiimaha warbaahinta ee jihada kale u socda ( cabbirka shaashadda la bixiyay ama ka yar ):
Ogsoonow maadaama daalacayaashu aysan hadda taageerin su'aalaha macnaha guud , waxaan ka shaqeyneynaa xaddidaadaha min-
iyo max-
horgalayaasha iyo muuqaallada leh ballacyada jajabka ah (kuwaas oo ku dhici kara xaalado gaar ah aaladaha-dpi-ga sare, tusaale ahaan) annaga oo adeegsanayna qiimayaal leh saxsanaan sare oo isbarbardhiggan ah. .
Mar labaad, weydiimahan warbaahinta ayaa sidoo kale laga heli karaa Sass mixins:
Waxa kale oo jira su'aalo warbaahineed iyo iskudhafyo lagu beegsanayo hal qayb oo cabbirrada shaashadda ah iyadoo la adeegsanayo ballaadhka ugu yar iyo ugu badnaan.
Weydiimahan warbaahinta waxaa sidoo kale laga heli karaa Sass mixins:
Sidoo kale, su'aalaha warbaahintu waxay koobi karaan balaadhyo kala duwan:
Isku darka Sass ee lagu beegsanayo cabbirka cabbirka isku midka ah wuxuu noqon lahaa:
Z-index
Qaybo badan oo Bootstrap ah ayaa isticmaala z-index
, hantida CSS ee ka caawisa xakamaynta qaabeynta iyadoo la siinayo dhidibka saddexaad si loo habeeyo nuxurka. Waxaan u isticmaalnaa cabbirka z-index-ka caadiga ah ee Bootstrap kaas oo loo qaabeeyey inuu si sax ah lakabka ugu dhejiyo navigation, tabaha aaladaha iyo popovers, moodooyinka, iyo in ka badan.
Qiimayaashan sare waxay ku bilowdaan tiro aan sabab lahayn, sare oo gaar ah oo ku filan si looga fogaado isku dhacyada. Waxaan u baahanahay jaangooyooyin kuwan ka kooban qaybahayada lakabyada ah - qalab-tips, popovers, navbars, dropdowns, modals - si aan si macquul ah ugu socono dabeecadaha. Ma jirto sabab aanaan u isticmaali karin 100
+ ama 500
+.
Ma dhiirigelineyno habeynta qiyamkan shaqsiyeed; Haddii aad mid bedesho, waxay u badan tahay inaad u baahan tahay inaad wada beddesho.
Si loo xakameeyo soohdimaha is dulsaaran ee ka kooban qaybaha (tusaale, badhamada iyo gelinta kooxaha galinta), waxaanu isticmaalnaa z-index
qiimayaal hal lambar oo hooseeya ee 1
, 2
, iyo 3
kuwa caadiga ah, duleelka, iyo gobolada firfircoon. Kor-u-qaadista/fiirsashada/firfircoonida, waxaanu keenaynaa shay gaar ah safka hore oo leh z-index
qiime sare si ay u muujiyaan xuduudkooda canaasirta walaalaha ah.