Sib nrug
Bootstrap suav nrog ntau yam ntawm cov lus teb luv luv thiab cov chav kawm siv hluav taws xob padding los hloov kho lub ntsiab lus.
Muab cov lus teb-phooj ywg margin
los yog padding
qhov tseem ceeb rau ib lub ntsiab lus lossis ib pawg ntawm nws sab nrog cov chav kawm luv. Xws li kev txhawb nqa rau cov khoom ntiag tug, txhua yam khoom, thiab cov khoom ntsug thiab kab rov tav. Cov chav kawm yog tsim los ntawm lub neej ntawd Sass daim ntawv qhia xws li .25rem
mus rau 3rem
.
Cov khoom siv sib cais uas siv rau txhua qhov kev sib cais, los ntawm xs
mus rau xl
, tsis muaj qhov luv luv ntawm lawv. Qhov no yog vim tias cov chav kawm no tau siv los ntawm min-width: 0
thiab nce, thiab yog li tsis muaj kev cuam tshuam los ntawm kev nug xov xwm. Cov seem breakpoints, txawm li cas los xij, suav nrog cov luv luv breakpoint.
Cov chav kawm muaj npe siv hom ntawv {property}{sides}-{size}
rau xs
thiab {property}{sides}-{breakpoint}-{size}
rau sm
, md
, lg
, thiab xl
.
Qhov twg khoom yog ib qho ntawm:
m
- rau cov chav kawm uas teemmargin
p
- rau cov chav kawm uas teempadding
Qhov twg sab yog ib qho ntawm:
t
- rau cov chav kawm uas teemmargin-top
los yogpadding-top
b
- rau cov chav kawm uas teemmargin-bottom
los yogpadding-bottom
l
- rau cov chav kawm uas teemmargin-left
los yogpadding-left
r
- rau cov chav kawm uas teemmargin-right
los yogpadding-right
x
- rau cov chav kawm uas teem ob qho tib si*-left
thiab*-right
y
- rau cov chav kawm uas teem ob qho tib si*-top
thiab*-bottom
- dawb paug - rau cov chav kawm uas teem ib
margin
los yogpadding
tag nrho 4 sab ntawm lub caij
Qhov loj me yog ib qho ntawm:
0
- rau cov chav kawm uas tshem tawmmargin
lossispadding
los ntawm kev teeb tsa0
1
- (los ntawm lub neej ntawd) rau cov chav kawm uas teeb tsamargin
lossispadding
rau$spacer * .25
2
- (los ntawm lub neej ntawd) rau cov chav kawm uas teeb tsamargin
lossispadding
rau$spacer * .5
3
- (los ntawm lub neej ntawd) rau cov chav kawm uas teeb tsamargin
lossispadding
rau$spacer
4
- (los ntawm lub neej ntawd) rau cov chav kawm uas teeb tsamargin
lossispadding
rau$spacer * 1.5
5
- (los ntawm lub neej ntawd) rau cov chav kawm uas teeb tsamargin
lossispadding
rau$spacer * 3
auto
- rau cov chav kawm uas teemmargin
rau auto
(Koj tuaj yeem ntxiv qhov ntau thiab tsawg los ntawm kev ntxiv nkag rau $spacers
Sass daim ntawv qhia hloov pauv.)
Nov yog qee qhov piv txwv ntawm cov chav kawm no:
Tsis tas li ntawd, Bootstrap tseem suav nrog cov .mx-auto
chav kawm rau kab rov tav nruab nrab qhov dav-dav thaiv cov ntsiab lus - uas yog, cov ntsiab lus uas muaj display: block
thiab width
teeb tsa - los ntawm kev teeb tsa cov kab rov tav rau auto
.