填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

sequence

定義一個動畫步驟列表,逐個依次執行它們。

Defines a list of animation steps to be run sequentially, one by one.

      
      sequence(steps: AnimationMetadata[], options: AnimationOptions = null): AnimationSequenceMetadata
    
引數
steps AnimationMetadata[]

一個由動畫步驟物件構成的陣列。

An array of animation step objects.

  • style() 呼叫定義的步驟會立即應用樣式資料。

    Steps defined by style() calls apply the styling data immediately.

  • animate() 呼叫定義的步驟會根據時序資料中的規定,在一段時間內應用樣式資料。

    Steps defined by animate() calls apply the styling data over time as specified by the timing data.

sequence([ style({ opacity: 0 }), animate("1s", style({ opacity: 1 })) ])
      
      sequence([
  style({ opacity: 0 }),
  animate("1s", style({ opacity: 1 }))
])
    
options AnimationOptions

一個配置物件,包含一個延遲和一些由開發人員定義的引數,這些引數會提供樣式的預設值,並可在呼叫時重寫。

An options object containing a delay and developer-defined parameters that provide styling defaults and can be overridden on invocation.

可選. 預設值是 `null`.
返回值

一個封裝了該動畫序列資料的物件。

AnimationSequenceMetadata: An object that encapsulates the sequence data.

使用說明

當你把一個步驟陣列傳給 transition() 呼叫時,這些步驟預設會順序執行。 作為對比,group() 的呼叫會並行執行各個動畫步驟。

When you pass an array of steps to a transition() call, the steps run sequentially by default. Compare this to the group() call, which runs animation steps in parallel.

當在 group()transition() 呼叫中應用動畫序列時, 只有當每個內部動畫步驟都完成之後,才會繼續執行下一個指令。

When a sequence is used within a group() or a transition() call, execution continues to the next instruction only after each of the inner animation steps have completed.