vue 路由过渡效果(1)

1.html界面

<transition name="slide">
      <router-view></router-view>
</transition>

 

2.css

.slide-enter-active, .slide-leave-active {
  transition: opacity .8s;
}
.slide-enter, .slide-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}

 

上一篇:前端常见浏览器兼容性问题


下一篇:长页面滚屏动画