Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q32.Transition / Animation 区别联系 #33

Open
lstoryc opened this issue Aug 18, 2020 · 1 comment
Open

Q32.Transition / Animation 区别联系 #33

lstoryc opened this issue Aug 18, 2020 · 1 comment

Comments

@lstoryc
Copy link
Owner

lstoryc commented Aug 18, 2020

Trasition 提供了从一种状态过渡到另一种状态的改变。

Animation 则可以从不同关键帧上设置多个过渡点。

image

这是由五个关键帧(状态)组成的动画,两个关键帧之间的过渡效果就是一个Trasition。
整个动画的全过程,就是一个Animation。

所以:transition是Animation的一个子集,即一个Animation是由多个transition组合而成的。

@lstoryc
Copy link
Owner Author

lstoryc commented Aug 18, 2020

animation缺点:在极端情况下,animation比transition更占资源,在前端压力过大时animation的关键帧动画无法显示出来
animation优点:在于能够实现更复杂动画

transition优点:占用资源小
transition缺点:无法实现复杂动画

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant