1. 程式人生 > >vue頁面切換過渡

vue頁面切換過渡

city wid nbsp translate absolute bezier leave child out

<!--<transition name="slide-left">-->
<router-view></router-view>
<!--</transition>class="child-view"-->

.child-view {
position: absolute;
width:100%;
transition: all .8s cubic-bezier(.55,0,.1,1);
}
.slide-left-enter, .slide-right-leave-active {
opacity: 0;
-webkit-transform: translate(50px, 0);
transform: translate(50px, 0);
}
.slide-left-leave-active, .slide-right-enter {
opacity: 0;
-webkit-transform: translate(-50px, 0);
transform: translate(-50px, 0);}

vue頁面切換過渡