Source

Kala dheeraynta

Bootstrap waxa ku jira tiro balaadhan oo ah margin ka jawaabida gacan gaaban iyo fasalada utility padding si wax looga beddelo muuqaalka shay.

Sida ay u shaqeyso

U qoondee saaxiibtinimo-saaxiibtinimo marginama paddingqiyamka shay ama qayb ka mid ah dhinacyadiisa oo leh fasalo gaaban. Waxaa ku jira taageerada guryaha gaarka ah, dhammaan guryaha, iyo kuwa toosan iyo kuwa jiifka ah. Fasallada waxaa laga dhisay khariidadda Sass ee caadiga ah oo u dhaxaysa .25remilaa 3rem.

Ogaysiis

Kala dheeraynta yutiilitida ee khuseeya dhammaan meelaha jabinta, laga bilaabo xsilaa xl, kuma jiraan wax soo gaabin ah. Tani waa sababta oo ah fasalladaas waxaa laga dalbadaa min-width: 0kor iyo kor, sidaas darteed kuma xirna su'aal warbaahineed. Dhibcaha soo haray, si kastaba ha ahaatee, waxaa ku jira soo gaabinta barta jabinta.

{property}{sides}-{size}Fasallada waxaa lagu magacaabay qaabka xsiyo {property}{sides}-{breakpoint}-{size}, sm, md, lgiyo xl.

Halka hantidu ka mid tahay:

  • m- fasallada dhigaymargin
  • p- fasallada dhigaypadding

Halka dhinacyadu ay ka mid yihiin:

  • t- fasallada dhigay margin-topamapadding-top
  • b- fasallada dhigay margin-bottomamapadding-bottom
  • l- fasallada dhigay margin-leftamapadding-left
  • r- fasallada dhigay margin-rightamapadding-right
  • x- fasallada dhigay labada *-leftiyo*-right
  • y- fasallada dhigay labada *-topiyo*-bottom
  • maran - fasallada dhigay a marginama paddingdhammaan 4 dhinac ee curiyaha

Halka cabbirku yahay mid ka mid ah:

  • 0- fasallada meesha ka saaraya marginama paddingdejinaya0
  • 1- (sida caadiga ah) ee fasallada dejiya marginama paddingku dhejiya$spacer * .25
  • 2- (sida caadiga ah) ee fasallada dejiya marginama paddingku dhejiya$spacer * .5
  • 3- (sida caadiga ah) ee fasallada dejiya marginama paddingku dhejiya$spacer
  • 4- (sida caadiga ah) ee fasallada dejiya marginama paddingku dhejiya$spacer * 1.5
  • 5- (sida caadiga ah) ee fasallada dejiya marginama paddingku dhejiya$spacer * 3
  • auto- fasallada u dejinaya marginauto

(Waxaad ku dari kartaa cabbirro badan adiga oo ku daraya gelinta $spacersdoorsoomiyaha khariidada Sass.)

Tusaalooyinka

Waa kuwan qaar ka mid ah tusaalayaal matala fasalladan:

.mt-0 {
  margin-top: 0 !important;
}

.ml-1 {
  margin-left: ($spacer * .25) !important;
}

.px-2 {
  padding-left: ($spacer * .5) !important;
  padding-right: ($spacer * .5) !important;
}

.p-3 {
  padding: $spacer !important;
}

Dhexdhexaadinta

Intaa waxa dheer, Bootstrap waxa kale oo ka mid ah .mx-autofasal si toos ah u dhexeya nuxurka heerka balac ballaca go'an - taas oo ah, waxa ka kooban display: blockiyo widthgo'an-adiga oo dejinaya soohdimaha toosan auto.

Cunsurka dhexe
<div class="mx-auto" style="width: 200px;">
  Centered element
</div>