大网数据广告活动
Web 标准与前端开发

`<timeline-range-name>` CSS type

· 52CE 我爱测

The **`<timeline-range-name>`** enumerated data type is a CSS identifier representing one of the predefined named timeline ranges inside a view progress timeline.

The <timeline-range-name> enumerated data type is a CSS identifier representing one of the predefined named timeline ranges inside a view progress timeline.

The <timeline-range-name> keyword values are used in keyframe selectors and the following longhand and shorthand properties:

  • animation-range-end
  • animation-range-start
  • animation-range shorthand
  • timeline-trigger-activation-range-end
  • timeline-trigger-activation-range-start
  • timeline-trigger-activation-range shorthand
  • timeline-trigger-active-range-end
  • timeline-trigger-active-range-start
  • timeline-trigger-active-range shorthand

Syntax

Valid <timeline-range-name> values:

  • cover

    • : Represents the full range of a view progress timeline, from the point where the subject element's start border edge first enters the scrollport's view progress visibility range (0% progress) to the point where the end border edge has completely left it (100% progress). This is the default range for view progress timelines.
  • contain

    • : Represents the range of a view progress timeline where the subject element is fully contained by, or fully contains, the view progress visibility range within the scrollport
      • If the subject element is smaller than the scrollport, it ranges from the point where the subject element is first completely contained by the scroll port (0% progress), to the point where it is no longer completely contained by the scroll port (100% progress).
      • If the subject element is larger than the scrollport, it ranges from the point where the subject element first completely covers the scroll port (0% progress), to the point where it no longer completely covers the scrollport (100% progress).
  • entry

    • : Represents the range of a view progress timeline from the point where the subject element first starts to enter the scroll port, to the point where it has completely entered the scrollport. 0% is equivalent to 0% of the cover range. 100% is equivalent to 0% of the contain range.
  • exit

    • : Represents the range of a view progress timeline from the point where the subject element first starts to exit the scroll port, to the point where it has completely exited the scrollport. 0% is equivalent to 100% of the contain range. 100% is equivalent to 100% of the cover range.
  • entry-crossing

    • : Represents the range during which the principal box crosses the end border edge. The start (0% progress) of the range occurs when the start border edge of the element's principal box coincides with the end edge of its view progress visibility range. The end (100%) of the range is the point at which the end border edge of the element's principal box coincides with the end edge of its view progress visibility range. The size of the range is the size of the element's principal box in the scroll direction.
  • exit-crossing

    • : Represents the range where the principal box crosses the start border edge. The range start (0% progress) occurs when the start border edge of the element's principal box coincides with the start edge of its view progress visibility range. The range end (100% progress) is the point at which the end border edge of the element's principal box coincides with the start edge of its view progress visibility range. The size of the range is the size of the element's principal box in the scroll direction.
  • scroll

    • : Represents the full range of the scroll container on which the view progress timeline is defined. The range start (0% progress) and end (100% progress) occur at the very start and end positions of the scroll container underlying the view progress timeline. This is the default range for scroll progress timelines.

Formal syntax

Examples

See the View timeline range visualizer.

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。