定义一个混入:
@mixin flex{
display: flex;
justify-content:space-between;
align-items: center;
flex-direction: row;
}
使用混入:
.flight {
@include flex;
box-sizing: border-box;
}
--------------------------------
//向混入传递变量
定义一个混入:
$center:center;
@mixin flex($vertical:$center) {
display: flex;
align-items: $vertical;
}
使用混入:
.flight {
@include flex(left);
box-sizing: border-box;
}