Skip to content

Instantly share code, notes, and snippets.

@jokemmy
Created March 7, 2018 05:51
Show Gist options
  • Save jokemmy/8c5dde32310997b35d0e57b04b1fcbd2 to your computer and use it in GitHub Desktop.
Save jokemmy/8c5dde32310997b35d0e57b04b1fcbd2 to your computer and use it in GitHub Desktop.

动画实现原则

在实现动画时,我个人一直遵循以下几个原则:

  1. 性能,性能,还是性能:这方面的建议就是在有选择时,一定要使用基于CSS的动画,将JS作为备选,因为考虑到硬件加速和性能之后,CSS几乎总是优于原生JS实现的动画
  2. 微小低调的动画往往表现更好
  3. 大而绚丽的动画需要带有目的性:不能只为了“好看”
  4. 动画持续时间要短
  5. 让动画具有弹性:或者说缓动效果
  6. 动画不要突然停止
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment