Kɔntinɛnt na di mɔs besik layout ɛlimɛnt na Bootstrap ɛn dɛn nid dɛn we yu de yuz wi difɔlt grid sistem . Pik frɔm wan kɔntena we de ansa, we gɛt fiks-wid (we min se i de max-widthchenj na ɛni brek pɔynt) ɔ we gɛt wata (we min se i de 100%wayd ɔltɛm).
Pan ɔl we dɛn kin nest kɔntena dɛn, bɔku pan di layout dɛn nɔ nid kɔntena we dɛn nest.
Yuz .container-fluidfɔ wan kɔntena we gɛt ful wit, we de span di wan ol wit na di viupɔt.
Brekpoint dɛn we de ansa
Bikɔs dɛn dɔn mek Bootstrap fɔ bi mobayl fɔs, wi de yuz wan anful midia kwɛstyɔn dɛn fɔ mek sɛnsful brekpɔynt dɛn fɔ wi layout ɛn intafays dɛn. Dɛn brekpɔynt ya mɔs bies pan di minimum viupɔt wit ɛn dɛn de alaw wi fɔ skel ɔp ɛlimɛnt dɛn as di viupɔt de chenj.
Bootstrap de yuz di fɔs midia kwɛstyɔn rɛnj dɛn—ɔ brekpɔynt dɛn—insay wi sɔs Sass fayl dɛn fɔ wi layout, grid sistem, ɛn kɔmpɔnɛnt dɛn.
Sins wi rayt wi sɔs CSS na Sass, ɔl wi midia kwɛstyɔn dɛn de via Sass mixins:
Wan wan tɛm wi kin yuz midia kwɛstyɔn dɛn we kin go na di ɔda say (di skrin saiz we dɛn gi ɔ di smɔl wan ):
Notis se bikɔs brawza dɛn nɔ de sɔpɔt rɛnj kɔntɛks kwɛstyɔn dɛn naw , wi de wok rawnd di limiteshɔn dɛn fɔ min-ɛn max-prɛfiks ɛn viupɔt dɛn wit frakshɔn wid (we kin apin ɔnda sɔm kɔndishɔn dɛn na ay-dpi divays dɛn, fɔ ɛgzampul) bay we wi de yuz valyu dɛn wit ay prɛsishɔn fɔ dɛn kɔmpiashɔn dɛn ya .
Wans bak, dɛn midia kwɛstyɔn ya de bak bay Sass mixins:
I gɛt bak midia kwɛstyɔn ɛn miksin fɔ tɔch wan singl sɛgmɛnt pan skrin saiz dɛn we de yuz di minim ɛn maksimal brekpɔynt wit.
Di Sass mixin fɔ target di sem skrin saiz rɛnj go bi:
Z-indeks
Bɔku Bootstrap kɔmpɔnɛnt dɛn de yuz z-index, di CSS prɔpati we de ɛp fɔ kɔntrol layout bay we i de gi wan tɔd aks fɔ arenj kɔntinyu. Wi de yuz wan difɔlt z-indeks skel na Bootstrap we dɛn dɔn mek fɔ layt nevigishɔn, tultips ɛn popovers, modals, ɛn mɔ fayn fayn wan.
Dɛn ay valyu ya kin stat pan wan arbitri nɔmba, ay ɛn spɛshal inof fɔ ideally avɔyd kɔnflikt. Wi nid wan standad sɛt fɔ dɛn wan ya akɔdin to wi layt kɔmpɔnɛnt dɛn—tultips, popovers, navbars, dropdowns, modals—so wi kin rili kɔnsistɛnt insay di bihayvya dɛn. No rizin nɔ de fɔ mek wi nɔ bin fɔ dɔn yuz 100+ ɔ 500+.
Wi nɔ de ɛnkɔrej fɔ kɔstɔmayt dɛn wan wan valyu dɛn ya; if yu chenj wan, yu go mɔs nid fɔ chenj dɛn ɔl.
Fɔ handel ɔvalap bɔda dɛn insay kɔmpɔnɛnt dɛn (ɛgz., bɔtin ɛn input dɛn na input grup dɛn), wi de yuz lɔw singl dijit z-indexvalyu dɛn fɔ 1, 2, ɛn 3fɔ difɔlt, hova, ɛn aktiv stet dɛn. Na hova/fokus/aktiv, wi de briŋ wan patikyula ɛlimɛnt to di fɔs wan wit ay z-indexvalyu fɔ sho dɛn bɔda oba di brɔda ɛn sista ɛlimɛnt dɛn.