What is class=“mb-0” in Bootstrap 4?
悠扬的幻想天空 - 博客
September 22, 2018 日常 • 作者:悠扬
It is used to create a bottom margin of 0 (margin-bottom:0
).
Bootstrap 4 has a wide range of responsive margin and padding utility classes. They work for all breakpoints: xs
(<=576px), sm
(>=576px), md
(>=768px), lg
(>=992px) or xl
(>=1200px)):
The classes are used in the format: {property}{sides}-{size}
for xs
and {property}{sides}-{breakpoint}-{size}
for sm
, md
, lg
, and xl
.
Where property is one of:
m
- setsmargin
p
- setspadding
Where sides is one of:
t
- setsmargin-top
orpadding-top
b
- setsmargin-bottom
orpadding-bottom
l
- setsmargin-left
orpadding-left
r
- setsmargin-right
orpadding-right
x
- sets bothpadding-left
andpadding-right
ormargin-left
andmargin-right
y
- sets bothpadding-top
andpadding-bottom
ormargin-top
andmargin-bottom
- blank - sets a
margin
orpadding
on all 4 sides of the element
Where size is one of:
0
- setsmargin
orpadding
to0
1
- setsmargin
orpadding
to.25rem
(4px if font-size is 16px)2
- setsmargin
orpadding
to.5rem
(8px if font-size is 16px)3
- setsmargin
orpadding
to1rem
(16px if font-size is 16px)4
- setsmargin
orpadding
to1.5rem
(24px if font-size is 16px)5
- setsmargin
orpadding
to3rem
(48px if font-size is 16px)auto
- setsmargin
to auto