A tlangpuiin
I Bootstrap project laying out na tur component leh option hrang hrang, wrapping container, grid system chak tak, media object flexible tak, leh responsive utility class te pawh a tel.
Container te pawh a awm
Containers hi Bootstrap a layout element bulpui ber a ni a , kan default grid system kan hman hunah a mamawh a ni . Container te hi an chhunga thu awmte dahkhawmna, pad, leh (a chang chuan) center-na atan hman a ni. Container te hi nest theih a nih laiin, layout tam zawkah chuan nested container a ngai lo.
Bootstrap hian container hrang hrang pathum a keng tel a:
.container
max-width
, chu chuan responsive breakpoint tinah a set a.container-fluid
, chu chuwidth: 100%
breakpoint zawng zawngah a awm.container-{breakpoint}
, chu chuwidth: 100%
breakpoint tarlan thleng a ni
A hnuaia table hian container tinte max-width
chu original nen an khaikhin dan .container
leh .container-fluid
breakpoint tin across dan a tarlang a ni.
An thiltih danah en la kan Grid entirnan tehkhin rawh .
A tlem zawk <576px |
A te ≥576px a ni |
A laihawl ≥768px a ni |
A lian ≥992px a ni |
A lian zawk ≥1200px |
|
---|---|---|---|---|---|
.container |
100% a ni. | 540px a ni | 720px a ni | 960px a ni | 1140px a ni |
.container-sm |
100% a ni. | 540px a ni | 720px a ni | 960px a ni | 1140px a ni |
.container-md |
100% a ni. | 100% a ni. | 720px a ni | 960px a ni | 1140px a ni |
.container-lg |
100% a ni. | 100% a ni. | 100% a ni. | 960px a ni | 1140px a ni |
.container-xl |
100% a ni. | 100% a ni. | 100% a ni. | 100% a ni. | 1140px a ni |
.container-fluid |
100% a ni. | 100% a ni. | 100% a ni. | 100% a ni. | 100% a ni. |
All-in-one a awm vek
Kan default .container
class hi responsive, fixed-width container a ni a, max-width
breakpoint tinah a inthlak tihna a ni.
Tuiril
Full width container atan hmang la .container-fluid
, viewport zau zawng zawng a huam vek ang.
Chhanna pe thei
Bootstrap v4.4 ah hian responsive container te hi a thar a ni. Anni hian breakpoint tarlan a thlen hma loh chuan 100% wide class specify theihna an siam a, chu mi hnuah max-width
breakpoint sang zawk pakhat zel atan s kan apply thei a ni. Entirnan, breakpoint a thlen .container-sm
thlenga tan turin 100% wide a ni a, chutah chuan , , leh sm
hmangin a scale up ang .md
lg
xl
Chhanna pe thei breakpoints te
Bootstrap hi mobile atana siam hmasak a nih avangin media query tlemte hmangin kan layout leh interface te tan sensible breakpoint kan siam thin. Heng breakpoint te hi a tam zawk chu minimum viewport widths atanga siam a ni a, viewport a inthlak ang zelin elements te kan scale up theih phah a ni.
Bootstrap hian kan layout, grid system leh component hrang hrangte tan kan source Sass file-ah hian a hnuaia media query range—or breakpoint—te hi a hmang ber a ni.
Sass-a kan source CSS kan ziah avangin kan media query zawng zawng hi Sass mixins hmangin a awm vek a:
Media query kan hmang fo thin a, chu chu kawng danga kal (screen size pek emaw a aia te emaw ):
Browser-te hian tunah hian range context queries an support loh avangin, heng tehkhin thute atan hian value dik zawk hmangin fractional width nei prefix min-
lehmax-
viewport-te limitation (chu chu high-dpi device-a condition thenkhat hnuaiah a thleng thei, entirnan) kan thawk ho tih hre reng ang che .
Vawi khat chu heng media zawhnate hi Sass mixins hmangin a awm bawk:
Breakpoint width tlem ber leh sang ber hmanga screen size segment pakhat target theihna tur media query leh mixin te pawh a awm bawk.
Heng media zawhnate hi Sass mixins hmangin a awm bawk:
Chutiang bawkin media query te pawh hian breakpoint width tam tak a huam thei bawk:
Screen size range inang target tur Sass mixin chu hetiang hi a ni ang:
Z-index a ni
Bootstrap component engemaw zatin z-index
, CSS property an hmang a, chu chuan layout control turin a pui a, content arrange turin third axis a pe a ni. Bootstrap ah hian default z-index scale kan hmang a, chu chu navigation, tooltips leh popovers, modals leh thil dang tam tak layer tha taka layer thei tura siam a ni.
Heng value sang zawkte hi duh duh number atanga tan a ni a, a sang leh a bik tawk a, a tha berah chuan buaina awm lo turin a intan thin. Kan layered component hrang hrangah hengte hi standard set kan mamawh a—tooltips, popovers, navbars, dropdowns, modals—chutiang chuan behaviors-ah hian reasonably consistent kan ni thei ang. 100
+ emaw + emaw kan hman theih loh chhan tur a awm lo 500
.
Heng mimal hlutnate hi customization kan fuih lo va; pakhat i thlak a nih chuan, i thlak vek a ngai mai thei.
Component chhunga overlapping border (eg, input group-a button leh input) te handle tur chuan , , leh default, hover, leh active state-te tan single digit z-index
value hniam tak tak kan hmang bawk. Hover/focus/active-ah chuan element pakhat bik chu value sang zawk nen hmahruaituah kan rawn hruai a, chu chuan sibling element-te chunga an border a lantir theih nan.1
2
3
z-index