html:
原本标签:<div :class="{'active_':!aActive}" >
现在标签:<div :class="{'active_':!aActive,'active__new':aActive}" >
通过类名切换不同标签里面的背景图
css:
.active_ { //第一张背景图
z-index:100;
background: url("./assets/bg.png") ;
background-size: 100% 100% !important;
background-repeat: no-repeat !important;
}
.active__new { //第二张背景图
z-index:100;
background: url("./assets/bg_aaa.png") !important;
background-size: 100% 100% !important;
background-repeat: no-repeat !important;
}
底部标签,点击标签 通过类名切换背景图
猜你喜欢
转载自blog.csdn.net/wuj1935/article/details/102982287
今日推荐
周排行