项目作者: good-father

项目描述 :
vue-transition animation
高级语言: CSS
项目地址: git://github.com/good-father/vue-transition.css.git
创建时间: 2017-12-14T10:57:07Z
项目社区:https://github.com/good-father/vue-transition.css

开源协议:MIT License

下载


Github Release" class="reference-link">vue-transition.css Build Status Github Release

vue-transition动画库

安装

npm 安装

  1. npm install vue-transition.css --save

CDN 可以通过下载vue-transition.min.css,在页面上引入 css 文件即可开始使用。

  1. <!-- 引入样式 -->
  2. <link rel="stylesheet" href="vue-transition.min.css">

使用

  1. // 入口页,如app.vue
  2. <template>
  3. <div class="app">
  4. ...
  5. // 例如使用 move-right-to-left 动画
  6. <transition name="move-right-to-left">
  7. <router-view class="app-router-view"></router-view>
  8. </transition>
  9. ...
  10. </div>
  11. </template>
  12. <script>
  13. // 引入vue-transition.css
  14. import 'vue-transition.css'
  15. ...
  16. </script>
  17. <style>
  18. // 给页面加上以下样式,动画才能生效
  19. html,
  20. body,
  21. .app {
  22. position: relative;
  23. width: 100%;
  24. height: 100%;
  25. overflow: hidden;
  26. }
  27. .app {
  28. background-color: #000;
  29. perspective: 1200px;
  30. }
  31. .app .app-router-view {
  32. position: absolute;
  33. top: 0;
  34. left: 0;
  35. bottom: 0;
  36. right: 0;
  37. overflow: hidden;
  38. backface-visibility: hidden;
  39. transform: translate3d(0, 0, 0);
  40. transform-style: preserve-3d;
  41. visibility: visible;
  42. }
  43. </style>

查看所有动画

欢迎留言或star,如果对demo中的美女不满意,可以加qq(1024371442)私聊:smile:

License

vue-transition.css is licensed under the MIT license.(http://opensource.org/licenses/MIT)