scss使用@mixin
@mixin size($width: 10px; $height: 10px) {
width: $width;
height: $height;
}
@include size(12px;12px);
@mixin square($size) {
@include size($size, $size);
}
@include size(14px;14px);
less使用@mixin
.size(@width: 10px;@height: 10px) {
width: @width;
height: @height;
}
.size(12px;12px)
.square(@size) {
.size(@size, @size);
}
.suqare(14px;14px)