javascript - How to make Vue Routers Page Transition -


i can using vue.js vuerouter. need make page transitions not able to. how can implement code.

my code here https://jsbin.com/hopilecona/edit?html,css,js,output

please help.

page transitions work same normal transitions, can see have wrapped router view in transition, want make sure it's in out-in mode, first page fades out before next fades in:

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

now set fade transition need following css:

.fade-enter-active, .fade-leave-active {   transition: opacity .5s } .fade-enter, .fade-leave-active {   opacity: 0 } 

after it's matter of setting view router normal. here's jsfiddle:

https://jsfiddle.net/npe10jot/


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -