Is there equivalent of m-t-1 class of bootstrap 4.

2019-07-11 06:56发布

问题:

As stated in the title: I see in bootstrap 4 (alpha version) there are some classes to work with margins and paddings like m-t-1, p-a-1, etc.

I know... I can use custom classes. But just for information, is there equivalent classes of m-t-1, p-a-1 and so on in bootstrap 3?

Tnx

回答1:

No, the spacing utility classes for padding and margins were introduced in Bootstrap 4, so there is no equivalent in Bootstrap 3.

Examples..

mb-2 = margin bottom 2 spacing units
m-0 = no margins
pt-3 = padding top 3 spacing units
p-1 = padding all sides 1 spacing unit
py-3 = padding top & bottom (y-axis) sides 3 spacing units

More on the spacing utils, and what's new in Bootstrap 4.