定义函数
// 背景图片地址和大小
@mixin bis($url) {
background-image: url($url);
background-repeat: no-repeat;
background-size: 100% 100%;
}
使用方式
@include bis(‘./a.jpg’);
定义变量
$fc:#fff;
使用方式
z-index:$fc;
定义复合变量
@mixin allcover{
position:absolute;
top:0;
right:0;
}
使用方式
@include allcover;