@mixin floorWal($w,$h,$img) {
width: $w;
height: $h;
background: url(./images/$img) no-repeat center;
}
如上 $img
是不执行的 该如何 传入才 可生效呢
生成如下 css
width: 105px;
height: 105px;
background: url(images/$img) center no-repeat;
求 sass
大神指导一下
解决如下
@mixin floorWal($w,$h,$img) {
width: $w;
height: $h;
background: url(./images/#{$img}) no-repeat center;
}