048——VUE中使用animate.css动画库控制vue.js过渡效果

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>使用animate.css动画库控制vue.js过渡效果</title>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
</head>
<body>

<div id="hdcms">
    <button @click="type=!type">显示/隐藏</button>
    <transition enter-active-class="animated fadeOutDown" leave-active-class="animated fadeInDown">
        <h1 v-if="type">http://www.baidu.com百度一下就知道</h1>
    </transition>
</div>

<script>
    new Vue({
        el: "#hdcms",
        data:{
            type:false
        }
    });
</script>
</body>

</html>

  

posted @ 2018-01-10 15:56  生如逆旅,一苇以航  阅读(1145)  评论(0编辑  收藏  举报