vue路由过渡效果
vue路由过渡效果//html结构<transition name='fade'><keep-alive><router-view></router-view></keep-alive></transition>//css样式.fade-enter-active, .fade-leave-active {
·
vue路由过渡效果
//html结构
<transition name='fade'>
<keep-alive>
<router-view></router-view>
</keep-alive>
</transition>
//fade(过渡)
.fade-enter-active, .fade-leave-active {
transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
//bounce(动画)
.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);
}
}
更多推荐
已为社区贡献4条内容
所有评论(0)