AnimationOptions

Options that control animation styling and timing.

用来控制动画样式和时序的选项。

interface AnimationOptions { delay?: number | string params?: {...} }

说明

The following animation functions accept AnimationOptions data:

下列动画函数可以接受 AnimationOptions 数据:

Programmatic animations built using the AnimationBuilder service also make use of AnimationOptions.

利用 AnimationBuilder 服务构建程序化动画时也会用到 AnimationBuilder

属性

属性名类型说明
delay

Sets a time-delay for initiating an animation action. A number and optional time unit, such as "1s" or "10ms" for one second and 10 milliseconds, respectively.The default unit is milliseconds. Default value is 0, meaning no delay.

设置第一个动画动作开始前的延迟时间。 包括一个数字和一个可选的时间单位,比如 "1s" 表示一秒,"10ms" 表示十毫秒。 默认单位是毫秒。 默认值为 0,表示不延迟。

params

A set of developer-defined parameters that modify styling and timing when an animation action starts. An array of key-value pairs, where the provided value is used as a default.

一组可由开发人员来定义的参数,用于在动画开始时修改样式和时序。 这是一组键值对,它所提供的值会用做默认值。