Isishwankathelo
Amacandelo kunye neenketho zokubeka iprojekthi yakho yeBootstrap, kubandakanya nezikhongozeli zokusonga, inkqubo yegridi enamandla, into yemidiya ebhetyebhetye, kunye neeklasi eziluncedo eziphendulayo.
Imigqomo yeyona nto isisiseko uyilo kwiBootstrap kwaye iyafuneka xa usebenzisa inkqubo yethu yegridi engagqibekanga . Khetha kwisingxobo esiphendulayo, esinobubanzi obusisigxina (okuthetha ukuba max-width
utshintsho lwaso kwindawo nganye yoqhawulo) okanye ububanzi bolwelo (okuthetha ukuba 100%
sibanzi ngalo lonke ixesha).
Ngelixa izikhongozeli zinokubekwa kwindlwane, uninzi lwezakhiwo azifuni sikhongozeli esinendlwane.
Sebenzisa .container-fluid
kwisikhongozeli esibanzi esigcweleyo, esinaba bonke ububanzi bendawo yokujonga.
Kuba iBootstrap iphuhliswe ukuba ihambe kuqala, sisebenzisa imibuzo embalwa yemithombo yeendaba ukwenza iindawo zokuqhawula ezinengqondo zoyilo lwethu kunye nojongano. Ezi ndawo zokuqhawuka zisekwe ubukhulu becala kobubanzi obuncinci bendawo yokujonga kwaye zisivumela ukuba sinyuse umgangatho njengoko utshintsho lwemboniselo.
I-Bootstrap ikakhulu isebenzisa olu luhlu lulandelayo lwemibuzo yemidiya-okanye iindawo zokuqhawula-kwimithombo yethu yeefayile ze-Sass zoyilo lwethu, inkqubo yegridi, kunye nezixhobo.
Kuba sibhala umthombo wethu we-CSS e-Sass, yonke imibuzo yethu yeendaba iyafumaneka ngokuxutywa kwe-Sass:
Ngamanye amaxesha sisebenzisa imibuzo yemidiya eya kwelinye icala (ubungakanani obunikiweyo besikrini okanye encinci ):
Qaphela ukuba njengoko abakhangeli beencwadi okwangoku bengayixhasi imibuzo yomxholo woluhlu , sisebenza malunga nemida min-
kunye max-
nezimaphambili kunye neendawo zokujonga ezinobubanzi obuqhekekileyo (okwenzeka phantsi kweemeko ezithile kwizixhobo eziphezulu ze-dpi, umzekelo) ngokusebenzisa amaxabiso anochaneka oluphezulu kolu thelekiso. .
Kwakhona, le mibuzo yemidiya iyafumaneka ngokuxutywa kweSass:
Kukwakho imibuzo yemidiya kunye nemixube yokujolisa kwisegmenti enye yobukhulu besikrini usebenzisa ubuncinci kunye nobubanzi bendawo yokuqhawuka.
Le mibuzo yemidiya iyafumaneka ngokuxutywa kweSass:
Ngokufanayo, imibuzo yemithombo yeendaba inokufikelela kububanzi bendawo yokuphumla:
Umxube we-Sass wokujolisa kuluhlu lwesayizi yeskrini efanayo iya kuba:
Amacandelo amaninzi eBootstrap asebenzisa z-index
, ipropati yeCSS enceda ukulawula uyilo ngokubonelela nge-axis yesithathu ukulungiselela umxholo. Sisebenzisa isikali sesalathiso sika-z esingagqibekanga kwiBootstrap eyilelwe ukuba ingamaleko ngokufanelekileyo, iingcebiso zesixhobo kunye neepopovers, iimodyuli, kunye nokunye.
La maxabiso aphezulu aqala kwinani elingenasizathu, eliphezulu kwaye lithe ngqo ngokwaneleyo ukuphepha iingxabano. Sifuna iseti esemgangathweni yazo zonke iinxalenye zethu ezineleyile-iingcebiso zezixhobo, iipopovers, ii-navbar, ukwehla, iimodyuli-ukuze sikwazi ukungaguquguquki kwindlela yokuziphatha. Akukho sizathu singakhange sisebenzise 100
+ okanye 500
+.
Asikukhuthazi ukwenza ezi nqobo zobuntu; ukuba utshintshe enye, kuya kufuneka utshintshe zonke.
Ukujongana nemida ethelelanayo ngaphakathi kwezixhobo (umzekelo, amaqhosha kunye negalelo kumaqela egalelo), sisebenzisa amanani asezantsi amadijithi omnye z-index
we 1
, 2
, kunye 3
nokungagqibekanga, i-hover, kunye neemeko ezisebenzayo. Kwi-hover/focus/esebenzayo, sizisa into ethile ngaphambili z-index
enexabiso eliphezulu ukubonisa umda wabo phezu kwezinto ezizalanayo.