rotate: false, //控制互转效果zhuan(){ this.rotate = !this.rotate;}_vue transition 旋转">
赞
踩
如图,点击切换时,需要转动动画
<img src="@img/assets/4.png" class="zhuan" @click="zhuan" :class="{go:rotate , aa :!rotate}">
rotate: false, //控制互转效果
zhuan(){
this.rotate = !this.rotate;
}
.aa {
transition: all .5s;
}
.go {
transform: rotate(180deg);
transition: all .5s;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。