<style lang="scss">
// 声明变量
$color:red;
// 混入
@mixin common {
height: 100px-20px;
// 百分比减 calc -号两端要有空格
calc(100% - 500px);
}
.mixin {
// 调用公共方法
@include common;
background: $color;
}
</style>
<style lang="scss">
// 声明变量
$color:red;
// 混入
@mixin common {
height: 100px-20px;
// 百分比减 calc -号两端要有空格
calc(100% - 500px);
}
.mixin {
// 调用公共方法
@include common;
background: $color;
}
</style>