いままでは余白は自分でクラスを設定していたが、Bootsrtap4では既にマージンやパディングが用意されている。
公式: https://getbootstrap.com/docs/4.1/utilities/spacing/
Where property is one of:
- m– for classes that set- margin
- p– for classes that set- padding
Where sides is one of:
- t– for classes that set- margin-topor- padding-top
- b– for classes that set- margin-bottomor- padding-bottom
- l– for classes that set- margin-leftor- padding-left
- r– for classes that set- margin-rightor- padding-right
- x– for classes that set both- *-leftand- *-right
- y– for classes that set both- *-topand- *-bottom
- blank – for classes that set a marginorpaddingon all 4 sides of the element
Where size is one of:
- 0– for classes that eliminate the- marginor- paddingby setting it to- 0
- 1– (by default) for classes that set the- marginor- paddingto- $spacer * .25
- 2– (by default) for classes that set the- marginor- paddingto- $spacer * .5
- 3– (by default) for classes that set the- marginor- paddingto- $spacer
- 4– (by default) for classes that set the- marginor- paddingto- $spacer * 1.5
- 5– (by default) for classes that set the- marginor- paddingto- $spacer * 3
- auto– for classes that set the- marginto auto