首页›CSS-Tricks›文章

Staggering Scroll-Driven Animations with animation-range-start

Lee Meyer · 2026年11月16日

AI 摘要 AI 生成,可能有误

本文探讨了如何在 CSS 中使用 animation-range-start 属性创建交错的滚动驱动动画。它通过一个 CSS“卡拉OK机”示例来说明这一概念:一个小球在逐渐高亮的文本上弹跳,整个效果作为一个单一且可预测的动画运行,由一个进度值驱动。本文最初发表于 CSS-Tricks。

Imagine a CSS karaoke machine that displays a ball bouncing on text that incrementally highlights, based on progress through via speech recognition and running that kind of animation as a single predictable, holistic effect driven by one progress value.

Staggering Scroll-Driven Animations with animation-range-start originally handwritten and published with love on CSS-Tricks. You should really get the newsletter as well.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 CSS-Tricks

Expanded Font Fallbacks

AI 摘要The author describes replacing a project's heading font with a new variable font by registering it via a CSS @font-face rule, specifying the WOFF2 file, a font-weight range of 200 to 700, and font-display: swap. The piece, published on CSS-Tricks, focuses on handling expanded font fallbacks during this font swap.

alpha()

The CSS alpha() function takes a relative color and adds transparency to it. alpha() originally handwritten and published with love on CSS-Tricks. You should really get the newsletter as well.

CSS timeline-scope: One Scroll, Multiple Carousels

AI 摘要The article explains the CSS `timeline-scope` property, which allows a timeline being tracked by an element—such as a scroll timeline or view timeline—to drive animations in any children or descendants of a parent element. Because all these elements are in scope, a single scroll can animate multiple elements, such as several carousels, at once.

Using light-dark() without getting caught out

AI 摘要This short CSS-Tricks post reflects on Martin Underhill's article about potential pitfalls when using the CSS light-dark() function. The author admits they hadn't considered the user and rendering considerations that could cause someone to get 'caught out,' despite relying heavily on light-dark() for their own site, and notes that the piece prompted them to reconsider their implementation choices.

RSS Club: Preview Art-Directed Scrollytelling Article

AI 摘要The author excitedly shares a preview of an upcoming art-directed scrollytelling article created in collaboration with long-time author Lee Meyer. The piece blends a 2013 aesthetic with modern 2026 techniques and will be published on CSS-Tricks. Readers are also encouraged to sign up for the newsletter.