A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/CSS/CSS_scroll-driven_animations below:

CSS scroll-driven animations - CSS

CSS scroll-driven animations

The CSS scroll-driven animations module provides functionality that builds on top of the CSS animations module and Web Animations API. It allows you to animate property values based on a progression along a scroll-based timeline instead of the default time-based document timeline. This means that you can animate an element by scrolling a scrollable element, rather than just by the passing of time.

There are two types of scroll-based timelines:

When one of these two timelines is applied to an animated element, the animation progresses along that timeline instead of following the default time-based timeline.

It is possible to adjust the effective placement of the animation along the scroll progress and view progress timelines, i.e., you can define the position at which the animation starts and ends. This can be done in a couple of different ways:

You can find several tools and demos showing scroll-driven animations in action at Scroll-driven Animations tools and demos.

Reference Properties

Set the timeline that will control the progress of an animation, and set its attachment range along that timeline:

Define named scroll progress timelines:

Define named view progress timelines:

Modify timeline scope:

At-rules

CSS scroll-driven animations adds the ability to include <timeline-range-name>s in @keyframes blocks, to place keyframes at specific positions inside named timeline ranges.

Functions

Possible values of the animation-timeline property for defining anonymous scroll progress timelines and anonymous view progress timelines (i.e., implicitly defined by the browser rather than being explicitly named and defined using the scroll-timeline-* and view-timeline-* properties):

Interfaces Specifications See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4