【发布时间】:2019-05-22 17:14:03
【问题描述】:
Bootstrap 4 提供了一堆间距类,它们都使用 $spacer SASS 变量。
https://getbootstrap.com/docs/4.1/utilities/spacing/
是否有任何 mixin 以便在不能(或不想)修改 html 并添加相关类的情况下将这些间距应用于元素?因此,对于没有引导类的元素,可能会有间距取决于 $spacer 值,
例如
.myClass {
@include mt-1; //behaves like adding the mt-1 class to the element itself
}
【问题讨论】:
标签: bootstrap-4 mixins spacing