1.混合
@mixin common {
fosnt-size: 12px;
color: #333;
}
.tip{
@include common
}
2.继承
.common{
fosnt-size: 12px;
color: #333;
}
.tip{
@extend .common;
}
3.抽象类
%common{
fosnt-size: 12px;
color: #333;
}
.tip{
@extend %common;
}
@mixin common {
fosnt-size: 12px;
color: #333;
}
.tip{
@include common
}
.common{
fosnt-size: 12px;
color: #333;
}
.tip{
@extend .common;
}
%common{
fosnt-size: 12px;
color: #333;
}
.tip{
@extend %common;
}