<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>使用第三方動畫_animate</title>
<link rel="stylesheet" type="text/css" href="css/animate.css">
</head>
<style type="text/css">
p{
width:250px;
height: 250px;
background-color: grey;
margin: 0 auto;
}
</style>
<script type="text/javascript" src="js/vue.js" ></script>
<body>
<div id="div1">
<button @click="flag=!flag">點擊</button>
<!-- 鉤子函數 -->
<transition enter-active-class="animated fadeInLeft" leave-active-class="animated fadeOutRight">
<p v-show="flag">
</p>
</transition>
</div>
</body>
<script>
let vm = new Vue({
el: "#div1",
data:{
flag:false
},
});
</script>
</html>
Vue使用第三方動畫animate
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.