路由的过渡动画

 

app.vue

<transition name="fade" mode="out-in" >
<router-view></router-view>
</transition>

<style>

.fade-enter{
opacity: 0;
}
.fade-enter-active{
transition:opacity .5s;
}
.fade-leave{
opacity: 1;
}
.fade-leave-active{
opacity: 0;
transition:opacity .5s;
}
</style>

 

posted @ 2017-08-29 14:07  简单就好zyx  阅读(129)  评论(0编辑  收藏  举报