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

Angular group()用法 #27

Open
deepthan opened this issue Jan 26, 2018 · 0 comments
Open

Angular group()用法 #27

deepthan opened this issue Jan 26, 2018 · 0 comments

Comments

@deepthan
Copy link
Owner

group : 组

function group(
            steps: AnimationMetadata[],
            options: AnimationOptions | null = null
         ): AnimationGroupMetadata;
  • steps : 动画步骤数据
    它可以由样式或动画函数调用组成。在一个组中,每个样式或动画函数的调用都会立即同时执行,当然你可以使用关键帧或者动画的延迟函数来延迟执行动画。
  • options: 参见 AnimationOptions
group([
  animate("1s", { background: "black" }))
  animate("2s", { color: "white" }))
])
什么是组呢?

组是一个并行运行的动画步骤列表。当存在很多样式在不同时间段开始或结束动画,我们需要对它统一进行管理的时候作用非常明显。利用组我们可以轻易控制它们同时开始动画或者同时结束动画。
group函数既可以在序列(sequence)中使用,也可以在转换(transition)中使用,它只会在所有内部动画步骤完成后继续执行下一条指令。

group官网介绍

@deepthan deepthan changed the title group()用法 Angular group()用法 Jun 16, 2020
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