<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>5-3在Vue中同时使用过度和动画</title>
<script src="./js/vue.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="./css/animate.min.css"/>
</head>
<body>
<div id="app">
<!--调用animate.css库注意-->
<transition
name="plan"
appear
enter-active-class="animated swing"
leave-active-class="animated bounceOut"
appear-active-class="animated swing"
>
<div v-show="show">hello world</div>
</transition>
<button @click="handleClick">Change</button>
</div>
<script type="text/javascript">
var vm=new Vue({
el:"#app",
data:{
show:true
},
methods:{
handleClick:function(){
this.show=!this.show
}
}
})
</script>
</body>
</html>
课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握
了解课程