vue中动画分布解析

2020-12-01 16:19:26

参考连接 https://blog.csdn.net/qq_37977455/article/details/104765789

transition分为以下 六个阶段:

  • enter, enter-active, enter-active-to,

  • (开始 进入阶段的)第1帧 属性值 (默认属性值 的过渡阶段),移除enter动画,

  • leave, leave-active, leave-active-to

  • (开始 离开 阶段的)第1帧 默认属性值 (属性值 的过渡阶段),移除leave动画
    示例图(非重点)-仅供参考

2种使用:

// html
<transition name="slide"></transition>12
 /* 正常状态下detail组件默认为transformX(0) */
.slide-enter,
.slide-leave-to {
  transform : translateX(100%);
}
.slide-enter-active,
.slide-leave-active { transition: all .6s;}1234567

不考虑过渡速率,与下同,

@keyframes slideMove{
    0%{ transform : translateX(100%); }
    100%{ transform : translateX(0); }
}
.slide-enter-active { animation: .6s slideMove;}
.slide-leave-active { animation: .6s slideMove reverse;} /* 动画顺序翻转 */


  • 2017-02-13 17:50:05

    cURL error 60: SSL certificate problem: unable to get local issuer certificate

    Drupal 8 version uses Guzzle Http Client internally, but under the hood it may use cURL or PHP internals. If you installed PHP cURL on your PHP server it typically uses cURL and you may see an exception with error Peer certificate cannot be authenticated with known CA certificates or error code CURLE_SSL_CACERT (60).

  • 2017-02-16 08:09:01

    HTML中PRE和p的区别

    pre 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。 <pre> 标签的一个常见应用就是用来表示计算机的源代码。

  • 2017-02-16 15:14:14

    动态加载js和css

    开发过程中经常需要动态加载js和css,今天特意总结了一下常用的方法。