timeline-trigger-active-range
Limited availability70% of usersExperimental
Sets how long a timeline trigger stays on after it turns on, as a start and an end in one value. When the timeline leaves this range, the trigger turns off and runs the second action in animation-trigger, if there is one. By default it matches the activation range, and the spec says it always covers at least that much. It is the shorthand for timeline-trigger-active-range-start and timeline-trigger-active-range-end. The timeline-trigger shorthand can set it too. It works in Chrome and Edge 146 and later so far.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox or Safari yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
See individual properties- Inherited
- No
- Applies to
- all elements
Quick example
@keyframes rise {
from { opacity: 0; translate: 0 3rem; }
}
.panel {
timeline-trigger-name: --panel;
timeline-trigger-source: view();
timeline-trigger-activation-range: contain 0% contain 100%;
timeline-trigger-active-range: cover 0% cover 100%;
animation: rise 0.6s ease-out both;
animation-trigger: --panel play-forwards play-backwards;
}Values
timeline-trigger-active-range-starttimeline-trigger-active-range-endtimeline-trigger-active-range browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage70%of people can use this30% use a browser without it.
Browsers
146+
146+Mobile
146+Android