ViewTimeline Class
A view progress timeline (https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface): its current time is the progress of the visibility of a subject in the scrollport of its nearest ancestor scroll container, as a percentage (0% when it starts entering the scrollport, 100% when it has left it).
public sealed class ViewTimeline : ScrollTimeline- Inheritance
ScrollTimelineViewTimeline
Constructors
| Name | Description |
|---|---|
| ViewTimeline(ViewTimelineOptions) | Creates a view timeline of a subject (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-viewtimeline): the timeline belongs to the document of the subject. |
ViewTimeline(ViewTimelineOptions)
ViewTimeline.csCreates a view timeline of a subject (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-viewtimeline): the timeline belongs to the document of the subject.
public ViewTimeline(ViewTimelineOptions options)Properties
| Name | Description |
|---|---|
| EndOffset | Gets the scroll offset of the 100% position of the timeline, in px from the scroll origin (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-endoffset): 0px when the timeline is inactive. |
| Source | Gets the nearest ancestor scroll container of the subject that is scrollable in the axis of the timeline (https://drafts.csswg.org/scroll-animations-1/#dom-scrolltimeline-source), or null when the subject does not generate a box. |
| StartOffset | Gets the scroll offset of the 0% position of the timeline, in px from the scroll origin (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-startoffset): 0px when the timeline is inactive. |
| Subject | Gets the subject of the timeline (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-subject). |
EndOffset
ViewTimeline.csGets the scroll offset of the 100% position of the timeline, in px from the scroll origin (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-endoffset): 0px when the timeline is inactive.
public CssNumericValue EndOffset { get; }Property value
See also
Source
ViewTimeline.csStartOffset
ViewTimeline.csGets the scroll offset of the 0% position of the timeline, in px from the scroll origin (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-startoffset): 0px when the timeline is inactive.
public CssNumericValue StartOffset { get; }Subject
ViewTimeline.csGets the subject of the timeline (https://drafts.csswg.org/scroll-animations-1/#dom-viewtimeline-subject).
public Element Subject { get; }