Source

अवलोकन करना

अपने बूटस्ट्रैप प्रोजेक्ट गी बिछाने आस्तै घटक ते विकल्प, जिंदे च रैपिंग कंटेनर, इक शक्तिशाली ग्रिड सिस्टम, इक लचीली मीडिया वस्तु, ते उत्तरदायी उपयोगिता वर्गें शामल न.

कंटेनर

कंटेनर बूटस्ट्रैप च सारें शा बुनियादी लेआउट तत्व न ते साढ़े डिफ़ॉल्ट ग्रिड सिस्टम दा इस्तेमाल करदे बेल्लै जरूरी न . इक प्रतिक्रियाशील, नियत-चौड़ाई आह् ले कंटेनर (मतलब max-widthहर ब्रेकपॉइंट पर इसदे बदलाव) जां तरल-चौड़ाई (मतलब एह् 100%हर समें चौड़ा ऐ) थमां चुनो।

जदके कंटेनरें गी नेस्ट कीता जाई सकदा ऐ, तां मते सारे लेआउटें गी नेस्टेड कंटेनर दी लोड़ नेईं ऐ.

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

पूर्ण चौड़ाई आह् ले कंटेनर आस्तै इस्तेमाल करो .container-fluid, जेह् ड़ा व्यूपोर्ट दी पूरी चौड़ाई च फैले दा ऐ.

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

प्रतिक्रियाशील ब्रेकपॉइंट

चूंकि बूटस्ट्रैप गी पैह् ले मोबाइल होने आस्तै विकसित कीता गेदा ऐ, इस करियै अस अपने लेआउट ते इंटरफेस आस्तै समझदार ब्रेकपॉइंट बनाने आस्तै इक मुट्ठी भर मीडिया क्वेरी दा इस्तेमाल करदे आं। एह् ब्रेकपॉइंट मते सारें शा घट्ट व्यूपोर्ट चौड़ाई उप्पर आधारत न ते असेंगी व्यूपोर्ट बदलने दे कन्नै-कन्नै तत्वें गी स्केल करने दी इजाजत दिंदे न।

बूटस्ट्रैप मुक्ख रूप कन्नै साढ़े लेआउट, ग्रिड सिस्टम, ते घटकें आस्तै साढ़ी स्रोत Sass फाइलें च निम्नलिखित मीडिया क्वेरी श्रेणियें दा उपयोग करदा ऐ-जां ब्रेकपॉइंट।

// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` 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) { ... }

चूंकि अस अपने स्रोत CSS गी Sass च लिखने आं, इसलेई साढ़ी सारी मीडिया क्वेरी Sass mixins दे राहें उपलब्ध ऐ:

// No media query necessary for xs breakpoint as it's effectively `@media (min-width: 0) { ... }`
@include media-breakpoint-up(sm) { ... }
@include media-breakpoint-up(md) { ... }
@include media-breakpoint-up(lg) { ... }
@include media-breakpoint-up(xl) { ... }

// Example: Hide starting at `min-width: 0`, and then show at the `sm` breakpoint
.custom-class {
  display: none;
}
@include media-breakpoint-up(sm) {
  .custom-class {
    display: block;
  }
}

We occasionally use media queries that go in the other direction (the given screen size or smaller):

// 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

Note that since browsers do not currently support range context queries, we work around the limitations of min- and max- prefixes and viewports with fractional widths (which can occur under certain conditions on high-dpi devices, for instance) by using values with higher precision for these comparisons.

Once again, these media queries are also available via Sass mixins:

@include media-breakpoint-down(xs) { ... }
@include media-breakpoint-down(sm) { ... }
@include media-breakpoint-down(md) { ... }
@include media-breakpoint-down(lg) { ... }
// No media query necessary for xl breakpoint as it has no upper bound on its width

// Example: Style from medium breakpoint and down
@include media-breakpoint-down(md) {
  .custom-class {
    display: block;
  }
}

There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths.

// 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) { ... }

These media queries are also available via Sass mixins:

@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) { ... }

Similarly, media queries may span multiple breakpoint widths:

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

The Sass mixin for targeting the same screen size range would be:

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

Z-index

Several Bootstrap components utilize z-index, the CSS property that helps control layout by providing a third axis to arrange content. We utilize a default z-index scale in Bootstrap that’s been designed to properly layer navigation, tooltips and popovers, modals, and more.

These higher values start at an arbitrary number, high and specific enough to ideally avoid conflicts. We need a standard set of these across our layered components—tooltips, popovers, navbars, dropdowns, modals—so we can be reasonably consistent in the behaviors. There’s no reason we couldn’t have used 100+ or 500+.

We don’t encourage customization of these individual values; should you change one, you likely need to change them all.

$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;

घटकें दे अंदर ओवरलैपिंग सीमाएं गी संभालने आस्तै (जियां, इनपुट समूहें च बटन ते इनपुट), अस , , ते डिफाल्ट, होवर, ते सक्रिय राज्यें आस्तै घट्ट इकल अंक z-indexमूल्यें दा इस्तेमाल करदे आं. होवर/फोकस/एक्टिव पर, अस इक खास तत्व गी इक उच्च मूल्य कन्नै सामने आह् नने आं तां जे भैन-भ्रा तत्वें उप्पर उंदी सीमा गी दस्सेआ जाई सकै।123z-index