<div id="app">
<button @click="show = !show">toggle</button>
<transition name="bounce">
<p v-if="show">Hello world</p>
</transition>
</div>
.bounce-enter-active {
animation: bounce-in .5s;
}
.bounce-leave-active {
animation: bounce-in .5s reverse;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.5);
}
100% {
transform: scale(1);
}
}
new Vue({
el: '#app',
data: {
show: true
}
})