vue中 less图片不同分辨率处理
.mediaImg(@url) {
background-image: url("@{url}@x1.png");
@media only screen and (-webkit-min-device-pixel-ratio:1.5), (min-resolution: 1.5dppx) {
background-image: url("@{url}@x2.png");
}
@media only screen and (-webkit-min-device-pixel-ratio:3), (min-resolution: 3dppx){
background-image: url("@{url}@x3.png");
}
}
.img {
.mediaImg('~@/assets/images/vote/vote-bg')
}