<i class="icon" v-for="(item,index) in 4" :key="index" :class="{icon1:item==1,icon2:item==2,icon3:item==3,icon4:item==4}"></i>
<style lang="scss" scoped>
.icon{
display: block;//必须,块状显示
width: 0.12rem;
height: 0.12rem;
position: absolute;
}
.icon1{
background: url("../assets/tag_top_left.png") no-repeat; //图片,不重复
background-size: 100% 100%;
left: 0.2rem;
top:0.3rem;
}
</style>