AnimationTimeline Class

A source of time values for animations (https://drafts.csswg.org/web-animations-1/#timelines).

public abstract class AnimationTimeline

Properties

NameDescription
CurrentTimeGets the current time of the timeline, in milliseconds (https://drafts.csswg.org/web-animations-1/#dom-animationtimeline-currenttime), or null when the timeline is inactive.
DurationGets the duration of the timeline (https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-duration): 100% for a progress-based timeline, null for a document timeline.

Gets the current time of the timeline, in milliseconds (https://drafts.csswg.org/web-animations-1/#dom-animationtimeline-currenttime), or null when the timeline is inactive.

public CssNumberish? CurrentTime { get; }

Gets the duration of the timeline (https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-duration): 100% for a progress-based timeline, null for a document timeline.

public CssNumberish? Duration { get; }

Methods

NameDescription
Play(AnimationEffect?)Creates an animation of the effect on the timeline and plays it (https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-play).

Play(AnimationEffect?)

AnimationTimeline.cs

Creates an animation of the effect on the timeline and plays it (https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-play).

public Animation Play(AnimationEffect? effect = null)