sass中代码使用
1、sass中background:url问题,避免写一个又一个url链接,css.sass
// $img:"../image"; //本地路径
$img:"https://XXX/image";//服务器路径
//使用
.box{
background:url('#{$img}/btn.png') no-repeat;
background-size: 100%;
}
2、less中background:url问题 css.less
@img:"../image"
.box{
background:url("@{img}/bg.png") no-repeat;
background-size:100%;
}

浙公网安备 33010602011771号