<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>使用animate.css</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css" >
<style>
p{
width: 200px;
height: 200px;
background-color: red;
}
</style>
<script src="../resource/vue/vue.min.js"></script>
</head>
<body>
<div id="example-3">
<button @click="show = !show">
Toggle render
</button>
<transition enter-active-class="animated fadeInLeft" leave-active-class='animated fadeOutRight'>
<p v-if="show">hello</p>
</transition>
</div>
<script>
var vm = new Vue({
el:"#example-3",
data:{
show:true
}
});
</script>
</body>
</html>
如上,在vue中使用animate.css时,点击按钮后没有动画效果,自己定义css样式有效果,这是怎么一回事啊?
你确定你引用到了?jsbin