Bootstrap
Official Production:BootstrapVue
Check it out on the official website
About tool styles,Official Documentation (Fast Gate)
About margins,Official Documentation (Fast Gate)Examples of common tool styles(Bootstrap
Version>=v4)
margin
Margins:
The first sub-div
is0.25rem
above and right margin, as follows1
2
3
4
5<div class="d-flex flex-row">
<div class="m-0 mt-1 mr-1">Flex item 1</div>
<div>Flex item 2</div>
<div>Flex item 3</div>
</div>padding
Paddings:
The first sub-div
is0.25rem
from the lower left padding, as follows1
2
3
4
5<div class="d-flex flex-row">
<div class="p-0 pl-1 pb-1">Flex item 1</div>
<div>Flex item 2</div>
<div>Flex item 3</div>
</div>Usage: The optional values of
property
arem/p
formargin
andpadding
, the optional values forsides
aret/b/l/r/x/y
for up/down/left/right/horizontal/vertical respectively, and the optional values forbreakpoint
aresm, md, lg, xl
, which means to take effect in the case ofbreakpoint
1
2.{property}{sides}-{size} for xs
.{property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.The optional value of
size
is0/1/2/3/4/5/auto
, which can be found in_variables.scss
, as shown below:**As can be seen from the picture,
0
corresponds to no margin,1
corresponds to0.25rem
,2
corresponds to0.5rem
,3
corresponds to1rem
,4
corresponds to1.5rem
, and5
corresponds to3rem
Whileauto
is defined directly in_spacing.scss
under theutilities
folder,auto
is exclusive tomargin
, andpadding
is not supported
Commonly used margin-related styles, for the time being, I wrote here.
That’s all for the commonly used tool styles. For more information, please check out Official Documentation (Fast Gate)
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !