group
定义一个可以并行运行的动画步骤列表。
Defines a list of animation steps to be run in parallel.
group(steps: AnimationMetadata[], options: AnimationOptions = null): AnimationGroupMetadata
参数
steps | AnimationMetadata[] | 一个由动画步骤对象构成的数组。 An array of animation step objects.
例如: For example:
|
options | AnimationOptions | 一个配置对象,包含一个延迟和一些由开发人员定义的参数,这些参数用于提供样式的默认值,并可在调用时重写。 An options object containing a delay and developer-defined parameters that provide styling defaults and can be overridden on invocation. 可选. 默认值是 |
返回值
一个封装了该组数据的对象。
AnimationGroupMetadata
: An object that encapsulates the group data.
使用说明
当一系列样式分别需要在不同的起始时间开始动画并在不同的结束时间停止时,分组动画非常有用。
Grouped animations are useful when a series of styles must be animated at different starting times and closed off at different ending times.
当在 sequence()
或 transition()
中调用它时,除非完成所有内部动画步骤,否则不会执行后续步骤。
When called within a sequence()
or a transition()
call, does not continue to the next instruction until all of the inner animation steps have completed.