in English

አጠቃላይ እይታ

የመጠቅለያ ኮንቴይነሮችን፣ ኃይለኛ የፍርግርግ ስርዓትን፣ ተለዋዋጭ የሚዲያ ነገርን እና ምላሽ ሰጭ የመገልገያ ክፍሎችን ጨምሮ የBootstrap ፕሮጀክትዎን ለመዘርጋት አካላት እና አማራጮች።

ኮንቴይነሮች

ኮንቴይነሮች በ Bootstrap ውስጥ በጣም መሠረታዊው የአቀማመጥ አካል ናቸው እና የእኛን ነባሪ የፍርግርግ ስርዓት ሲጠቀሙ ይፈለጋሉ ። ኮንቴይነሮች በውስጣቸው ያለውን ይዘት ለመያዝ፣ ለመጠቅለል እና (አንዳንድ ጊዜ) ወደ መሃል ለማስገባት ያገለግላሉ። ኮንቴይነሮች ሊሰቀሉ ቢችሉም, አብዛኛዎቹ አቀማመጦች የጎጆ መያዣ አያስፈልጋቸውም.

Bootstrap ከሶስት የተለያዩ ኮንቴይነሮች ጋር አብሮ ይመጣል።

  • .containermax-widthበእያንዳንዱ ምላሽ ሰጪ መግቻ ነጥብ ላይ ሀ ያዘጋጃል።
  • .container-fluid, ይህም width: 100%በሁሉም የእረፍት ነጥቦች ላይ ነው
  • .container-{breakpoint}, ይህም width: 100%እስከተጠቀሰው መግቻ ነጥብ ድረስ ነው

ከታች ያለው ሠንጠረዥ የእያንዳንዳቸው መያዣ max-widthከመጀመሪያው .containerእና .container-fluidከእያንዳንዱ መግቻ ነጥብ ጋር እንዴት እንደሚነፃፀር ያሳያል።

እነሱን በተግባር ይመልከቱ እና በእኛ የፍርግርግ ምሳሌ ውስጥ ያወዳድሯቸው ።

በጣም ትንሽ
<576px
ትንሽ
≥576 ፒክስል
መካከለኛ
≥768 ፒክስል
ትልቅ
≥992 ፒክስል
በጣም ትልቅ
≥1200 ፒክስል
.container 100% 540 ፒክስል 720 ፒክስል 960 ፒክስል 1140 ፒክስል
.container-sm 100% 540 ፒክስል 720 ፒክስል 960 ፒክስል 1140 ፒክስል
.container-md 100% 100% 720 ፒክስል 960 ፒክስል 1140 ፒክስል
.container-lg 100% 100% 100% 960 ፒክስል 1140 ፒክስል
.container-xl 100% 100% 100% 100% 1140 ፒክስል
.container-fluid 100% 100% 100% 100% 100%

ሁሉም በአንድ

የእኛ ነባሪው .containerክፍል ምላሽ ሰጪ፣ ቋሚ ስፋት ያለው መያዣ ነው፣ ይህ ማለት max-widthበእያንዳንዱ መግቻ ነጥብ ላይ ለውጦች ማለት ነው።

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

ፈሳሽ

.container-fluidየእይታ መስጫውን አጠቃላይ ስፋት በመዘርጋት ለሙሉ ስፋት መያዣ ይጠቀሙ ።

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

ምላሽ ሰጪ

ምላሽ ሰጪ ኮንቴይነሮች በ Bootstrap v4.4 ውስጥ አዲስ ናቸው። የተገለጸው መግቻ ነጥብ እስኪደርስ ድረስ 100% ስፋት ያለው ክፍል እንዲገልጹ ያስችሉዎታል፣ ከዚያ በኋላ max-widthለእያንዳንዱ ከፍተኛ መግቻ ነጥብ s እንተገብራለን። ለምሳሌ፣ የመለያያ ነጥቡ .container-smእስኪደርስ ድረስ ለመጀመር 100% ስፋት ነው ፣ በ , እና .smmdlgxl

<div class="container-sm">100% wide until small breakpoint</div>
<div class="container-md">100% wide until medium breakpoint</div>
<div class="container-lg">100% wide until large breakpoint</div>
<div class="container-xl">100% wide until extra large breakpoint</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;
  }
}

አልፎ አልፎ ወደ ሌላ አቅጣጫ የሚሄዱ የሚዲያ መጠይቆችን እንጠቀማለን (በተሰጠው የስክሪን መጠን ወይም ከዚያ ያነሰ )፦

// 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
አሳሾች በአሁኑ ጊዜ የክልል አውድ መጠይቆችን ስለማይደግፉ እኛ የምንሰራው ውስንነት min-እና max-ቅድመ ቅጥያዎችን እና የእይታ ወደቦችን ከክፍልፋይ ስፋቶች ጋር ነው (ለምሳሌ በአንዳንድ ሁኔታዎች በከፍተኛ ዲፒአይ መሳሪያዎች ላይ ሊከሰት ይችላል) ለእነዚህ ንፅፅሮች ከፍተኛ ትክክለኛነት ያላቸውን እሴቶች በመጠቀም። .

አንዴ በድጋሚ፣ እነዚህ የሚዲያ ጥያቄዎች በ 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;
  }
}

አነስተኛውን እና ከፍተኛውን የመግጫ ነጥብ ስፋቶችን በመጠቀም አንድ ነጠላ የስክሪን መጠኖችን ለማነጣጠር የሚዲያ መጠይቆች እና ድብልቆችም አሉ።

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

እነዚህ የሚዲያ ጥያቄዎች በ 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) { ... }

በተመሳሳይ፣ የሚዲያ ጥያቄዎች ብዙ መግቻ ነጥብ ስፋቶችን ሊሸፍኑ ይችላሉ፡

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

ተመሳሳዩን የማያ መጠን ክልል ለማነጣጠር የ Sass ድብልቅ የሚከተለው ይሆናል፡-

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

ዜድ-ኢንዴክስ

በርካታ የ Bootstrap ክፍሎች z-indexይዘትን ለማዘጋጀት ሶስተኛ ዘንግ በማቅረብ አቀማመጥን ለመቆጣጠር የሚረዳውን የሲኤስኤስ ንብረት ይጠቀማሉ�� ዳሰሳን፣ የመሳሪያ ምክሮችን እና ፖፖቨርዎችን፣ ሞዳልሎችን እና ሌሎችንም በአግባቡ ለመደርደር የተነደፈውን ነባሪ የ z-index ልኬትን በBootstrap ውስጥ እንጠቀማለን።

እነዚህ ከፍተኛ ዋጋዎች በዘፈቀደ ቁጥር ይጀምራሉ, ከፍተኛ እና በቂ ግጭቶችን ለማስወገድ በቂ. በተደራረቡ ክፍሎቻችን - የመሳሪያ ምክሮች፣ ፖፖቨርስ፣ ናቭባርስ፣ ተቆልቋይዎች፣ ሞዳሎች - ስለዚህ በባህሪያቱ ላይ በምክንያታዊነት ወጥ መሆን እንድንችል የእነዚህን መደበኛ ስብስብ እንፈልጋለን። 100+ ወይም + ልንጠቀምበት ያልቻልንበት ምንም ምክንያት የለም 500

እነዚህን የግለሰብ እሴቶች ማበጀትን አናበረታታም። አንዱን ከቀየርክ ሁሉንም መቀየር ያስፈልግህ ይሆናል።

$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እሴቶችን 12እና 3ነባሪ፣ ማንዣበብ እና ንቁ ግዛቶችን እንጠቀማለን። z-indexበማንዣበብ/ማተኮር/አክቲቭ ላይ፣ በወንድም እህት አባሎች ላይ ድንበራቸውን ለማሳየት ከፍ ያለ ዋጋ ያለው አንድ የተወሰነ አካል ወደ ግንባር እናመጣለን ።