Gutters
Gutters ndiwo padding pakati pemakoramu ako, anoshandiswa kuita nzvimbo uye kurongedza zvirimo muBootstrap grid system.
Mashandiro avanoita
-
Gutters ndiwo maburi ari pakati pe column content, yakagadzirwa ne horizontal
padding
. Isu tinosetapadding-right
uyepadding-left
pane yega yega koramu, uye shandisa zvisina kunakamargin
kumisa izvo pakutanga uye pakupera kwemutsara wega wega kurongedza zvirimo. -
Magetsi anotangira pa
1.5rem
(24px
) zvakafara. Izvi zvinotibvumira kufananidza grid yedu kune padding uye margin spacers chiyero. -
Gutters inogona kugadziriswa nemhinduro. Shandisa breakpoint-specific gutter makirasi kugadzirisa akachinjika magita, magita akatwasuka, uye ese magita.
Horizontal gutters
.gx-*
makirasi anogona kushandiswa kudzora yakachinjika gutter upamhi. Iyo .container
kana .container-fluid
mubereki angangoda kugadziridzwa kana magita akakura akashandiswa zvakare kudzivirira kufashukira kusingadiwe, uchishandisa chinofananidzira padding utility. Semuenzaniso, mumuenzaniso unotevera takawedzera padding ne .px-4
:
<div class="container px-4 text-center">
<div class="row gx-5">
<div class="col">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
</div>
</div>
Imwe mhinduro ndeyekuwedzera wrapper yakatenderedza .row
iyo .overflow-hidden
nekirasi:
<div class="container overflow-hidden text-center">
<div class="row gx-5">
<div class="col">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
</div>
</div>
Vertical gutters
.gy-*
makirasi anogona kushandiswa kudzora vertical gutter wides mukati memutsara apo makoramu anoputira kune mitsetse mitsva. Kufanana nemagita akachinjika, magita akatwasuka anogona kukonzera kufashama pazasi .row
pekupera kwepeji. Kana izvi zvikaitika, iwe unowedzera wrapper yakatenderedza .row
nekirasi .overflow-hidden
:
<div class="container overflow-hidden text-center">
<div class="row gy-5">
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
</div>
</div>
Horizontal & vertical gutters
.g-*
makirasi anogona kushandiswa kudzora yakachinjika gutter hupamhi, kumuenzaniso unotevera isu tinoshandisa diki gutter upamhi, saka hapazove nechikonzero chekuwedzera .overflow-hidden
kirasi yekuputira.
<div class="container text-center">
<div class="row g-2">
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
<div class="col-6">
<div class="p-3 border bg-light">Custom column padding</div>
</div>
</div>
</div>
Row columns marata
Gutter makirasi anogona zvakare kuwedzerwa kune mitsara makoramu . Mumuenzaniso unotevera, tinoshandisa mitsara inoteerera mitsara uye makirasi anopindura egutter.
<div class="container text-center">
<div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3">
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
<div class="col">
<div class="p-3 border bg-light">Row column</div>
</div>
</div>
</div>
Hapana marata
Magetsi ari pakati pemakoramu mumakirasi edu akatemerwa grid anogona kubviswa ne .g-0
. Izvi zvinobvisa iyo inegetive margin
s kubva .row
uye yakachinjika padding
kubva kune ese ariko vana makoramu.
Unoda kumucheto-kune-kumucheto dhizaini? Donhedza mubereki .container
kana .container-fluid
wowedzera .mx-0
kune .row
kudzivirira kufashukira.
Mukuita, heino maitiro ayo anotaridzika. Ziva kuti unogona kuenderera mberi nekushandisa izvi nemamwe ese akafanotsanangurwa makirasi egidhi (kusanganisira column wides, anopindura tiers, reorder, nezvimwe).
<div class="row g-0 text-center">
<div class="col-sm-6 col-md-8">.col-sm-6 .col-md-8</div>
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
</div>
Shandura magita
Makirasi anovakwa kubva $gutters
kuSass mepu inogarwa nhaka kubva $spacers
kuSass mepu.
$grid-gutter-width: 1.5rem;
$gutters: (
0: 0,
1: $spacer * .25,
2: $spacer * .5,
3: $spacer,
4: $spacer * 1.5,
5: $spacer * 3,
);