<script src="vue.js"></script> <link rel="stylesheet" href="animate.css"> <style> /*@keyframes bounce-in {*/ /* 0% {*/ /* transform:scale(0);*/ /* }*/ /* 50% {*/ /* transform:scale(1.5);*/ /* }*/ /* 100% {*/ /* transform:scale(1);*/ /* }*/ /*}*/ /*.active {*/ /* transform-origin:left center;*/ /* animation: bounce-in 1s;*/ /*}*/ /*.leave {*/ /* transform-origin:left center;*/ /* animation: bounce-in 1s reverse;*/ /*}*/ </style> <body> <section class="app"> <transition name="fade" enter-active-class="animated flip" leave-active-class="animated hinge"> <article v-if="show">Selecte</article> </transition> <button @click="handle">Option</button> </section> <script> var vm = new Vue({ el:".app", data: { show:true }, methods: { handle:function () { this.show = !this.show } } }) </script> </body>
上面是动画效果