Skip to content

Pure CSS reveal on scroll

Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

The heading, the cards and the call-to-action link fade in as they enter the screen, driven by CSS view-driven animations (animation-timeline: view()): no script, no IntersectionObserver, the animation follows scrolling frame by frame. Stagger between siblings is automatic: each card gets its rank in the row from the number of columns (one, two or three, through container queries), so cards on the same line reveal one after another whatever their number, and a single column adds no needless wait. Each reveal ends as soon as the element has fully entered the screen: nothing in view stays half transparent. Three styles picked with the data-eacn-variant attribute: monter (rise), zoom or glisser (slide); distance and stagger set with --eacn-distance and --eacn-step. The text never turns transparent: a veil in the background colour (--eacn-veil) fades out instead, so contrast stays AA at every frame; only its opacity and the elements' transform are animated. In browsers without scroll-driven animations, with prefers-reduced-motion or when printing, nothing is hidden: content shows at once. An element that receives keyboard focus is always fully visible. AA contrast in light and dark mode, no overflow at 360 px. Example: a bicycle repair workshop in Lyon.

Code

Loading the code…

The code of this component in

Archive contents

effet-apparition-defilement-css-natif-html-tailwind.zip3 files · 6 Ko

  • index.html11 Ko
  • README.md5 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 1, 2026.

Reviews

No reviews yet.

In the same spirit

  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component