Source

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 . Responsive, fixed-width container ( max-widthbreakpoint tinah a inthlak tihna) emaw fluid-width (a zau reng tihna a ni) atang hian thlang rawh 100%.

Container te hi nest theih a nih laiin, layout tam zawkah chuan nested container a ngai lo.

<div class="container">
  <!-- Content here -->
</div>

Full width container atan hmang la .container-fluid, viewport zau zawng zawng a huam vek ang.

<div class="container-fluid">
  ...
</div>

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.

// Extra small devices (portrait phones, less than 576px)
// No media query since this is the default in Bootstrap

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }

Sass-a kan source CSS kan ziah avangin kan media query zawng zawng hi Sass mixins hmangin a awm vek a:

@include media-breakpoint-up(xs) { ... }
@include media-breakpoint-up(sm) { ... }
@include media-breakpoint-up(md) { ... }
@include media-breakpoint-up(lg) { ... }
@include media-breakpoint-up(xl) { ... }

// Example usage:
@include media-breakpoint-up(sm) {
  .some-class {
    display: block;
  }
}

Media query kan hmang fo thin a, chu chu kawng danga kal (screen size pek emaw a aia te emaw ):

// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }

// Small devices (landscape phones, less than 768px)
@media (max-width: 767.98px) { ... }

// Medium devices (tablets, less than 992px)
@media (max-width: 991.98px) { ... }

// Large devices (desktops, less than 1200px)
@media (max-width: 1199.98px) { ... }

// Extra large devices (large desktops)
// No media query since the extra-large breakpoint has no upper bound on its width

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 buaipui tih hre reng ang che .

Vawi khat chu heng media zawhnate hi Sass mixins hmangin a awm bawk:

@include media-breakpoint-down(xs) { ... }
@include media-breakpoint-down(sm) { ... }
@include media-breakpoint-down(md) { ... }
@include media-breakpoint-down(lg) { ... }

Breakpoint width tlem ber leh sang ber hmanga screen size segment pakhat target theihna tur media query leh mixin te pawh a awm bawk.

// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767.98px) { ... }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991.98px) { ... }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199.98px) { ... }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }

Heng media zawhnate hi Sass mixins hmangin a awm bawk:

@include media-breakpoint-only(xs) { ... }
@include media-breakpoint-only(sm) { ... }
@include media-breakpoint-only(md) { ... }
@include media-breakpoint-only(lg) { ... }
@include media-breakpoint-only(xl) { ... }

Chutiang bawkin media query te hian breakpoint width tam tak a huam thei bawk:

// Example
// Apply styles starting from medium devices and up to extra large devices
@media (min-width: 768px) and (max-width: 1199.98px) { ... }

Screen size range inang target tur Sass mixin chu hetiang hi a ni ang:

@include media-breakpoint-between(md, xl) { ... }

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.

$zindex-dropdown:          1000 !default;
$zindex-sticky:            1020 !default;
$zindex-fixed:             1030 !default;
$zindex-modal-backdrop:    1040 !default;
$zindex-modal:             1050 !default;
$zindex-popover:           1060 !default;
$zindex-tooltip:           1070 !default;

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-indexvalue 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.123z-index