Uhlolojikelele
Izingxenye nezinketho zokubeka iphrojekthi yakho ye-Bootstrap, okuhlanganisa iziqukathi zokugoqa, isistimu yegridi enamandla, into yemidiya eguquguqukayo, namakilasi ezinsiza eziphendulayo.
Izitsha
Iziqukathi ziyisici sesakhiwo esiyisisekelo ku-Bootstrap futhi siyadingeka uma kusetshenziswa uhlelo lwethu lwegridi oluzenzakalelayo . Khetha esitsheni esiphendulayo, esinobubanzi obugxilile (okusho max-width
izinguquko zaso endaweni ngayinye yokuphumula) noma ububanzi obuketshezi (okusho ukuthi 100%
sibanzi ngaso sonke isikhathi).
Nakuba iziqukathi zingafakwa , izakhiwo eziningi azidingi isiqukathi esinesidleke.
Sebenzisa .container-fluid
isitsha esinobubanzi obugcwele, esihlanganisa bonke ububanzi bembobo yokubuka.
Ama-breakpoints asabelayo
Njengoba i-Bootstrap ithuthukiswe ukuthi ibe yiselula kuqala, sisebenzisa imibuzo embalwa yemidiya ukuze sakhe izindawo zokunqamuka ezinengqondo zezakhiwo zethu nezixhumi ezibonakalayo. Lawa maphoyinti okunqamuka kakhulu asekelwe kububanzi obuncane bembobo yokubuka futhi asivumela ukuba sikhulise izici njengoba imbobo yokubuka ishintsha.
I-Bootstrap ngokuyinhloko isebenzisa ububanzi bemibuzo yemidiya elandelayo—noma ama-breakpoint—kumafayela wethu we-Sass ongumthombo wesakhiwo sethu, isistimu yegridi, nezingxenye.
Njengoba sibhala umthombo wethu we-CSS kwa-Sass, yonke imibuzo yethu yemidiya itholakala ngamamiksi e-Sass:
Ngezinye izikhathi sisebenzisa imibuzo yemidiya eya ngakolunye uhlangothi (usayizi wesikrini onikeziwe noma omncane ):
Qaphela ukuthi njengoba iziphequluli okwamanje zingayisekeli imibuzo yokuqukethwe kobubanzi , sisebenza eduze kwemikhawulo min-
kanye max-
neziqalo nezinkundla zokubuka ezinobubanzi obuyingxenyana (okungenzeka ngaphansi kwezimo ezithile kumadivayisi e-dpi ephezulu, isibonelo) ngokusebenzisa amanani anembe kakhulu kulokhu kuqhathanisa. .
Nakulokhu futhi, le mibuzo yemidiya iyatholakala nangemiksi ye-Sass:
Kukhona nemibuzo yemidiya nezixube zokukhomba ingxenye eyodwa yamasayizi wesikrini kusetshenziswa ubuncane kanye nobubanzi be-breakpoint.
Le mibuzo yemidiya iyatholakala futhi nge-Sass mixins:
Ngokufanayo, imibuzo yemidiya ingase idlulele kububanzi be-breakpoint multiple:
Ingxube ye-Sass yokukhomba ububanzi bosayizi wesikrini obufanayo izoba:
Z-inkomba
Izingxenye ezimbalwa ze-Bootstrap zisebenzisa z-index
, isici se-CSS esiza ukulawula isakhiwo ngokunikeza i-eksisi yesithathu ukuhlela okuqukethwe. Sisebenzisa isikali esizenzakalelayo se-z-inkomba ku-Bootstrap esiklanyelwe ukuzulazula ngokwesendlalelo esifanele, amathiphu wamathuluzi nama-popovers, amamodeli, nokuningi.
Lawa manani aphezulu aqala enombolweni engafanele, ephezulu futhi ecacile ngokwanele ukugwema ukungqubuzana. Sidinga isethi evamile yalokhu kuzo zonke izingxenye zethu ezinengqimba—amathuluzi, ama-popovers, ama-navbar, okwehliswayo, amamodeli—ukuze sikwazi ukungaguquguquki ngendlela enengqondo ekuziphatheni. Asikho isizathu sokuthi singasebenzisanga 100
+ noma 500
+.
Asikukhuthazi ukwenziwa ngendlela oyifisayo lawa manani angawodwana; uma ushintsha eyodwa, cishe udinga ukuwashintsha wonke.
Ukusingatha imingcele egqagqene ngaphakathi kwezingxenye (isb, izinkinobho nokokufaka emaqenjini okokufaka), sisebenzisa amanani aphansi edijithi eyodwa z-index
ethi 1
, 2
, kanye nezimo 3
ezizenzakalelayo, ezihamba phezulu, nezisebenzayo. Kokuhambisa phezulu/okugxilile/okusebenzayo, siletha into ethile phambili enevelu eliphezulu z-index
ukubonisa umngcele wayo phezu kwama-elementi ayizelamani.