Skip to content

Pinned section with an evolving background

The key message stays pinned while the background changes colour and illustration at each scroll step. CSS sticky, a light script, stacked cards as fallback under prefers-reduced-motion.

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

Description

A section for craftspeople and service businesses that want to drive a promise home while showing their method, here a bathroom renovation company: visit, quote, works, handover. The heading, the lead text and the “Request a free visit” button stay fixed on screen; at each step that scrolls by, the background takes a new colour, a large number and an SVG illustration that slide in with a fade, and a meter under the button moves on. On large screens the step cards scroll in the right column; on mobile they pass at the bottom of the screen under the message. Each step carries its own colours and drawing in a real ordered list: the script builds the background layers from them, so there is nothing to duplicate. Without JavaScript, with prefers-reduced-motion or in a very short window (400% zoom), the section shows as the message followed by stacked cards, each on its colour with its illustration, with no animation and no lost content. Screen readers: a level 2 heading, a list named “Our method in four steps” (in French), the decoration hidden with aria-hidden and nothing announced while scrolling. The button stays clickable while the cards go by, 44 px target, visible focus ring. Transitions only touch opacity and transform. AA contrast in light and dark mode, illustrations included, four tones adjustable via variables (--sefe-t1 to --sefe-t4) and an --sefe-offset if your site has a sticky header. No dependencies, no images.

Code

Loading the code…

The code of this component in

Archive contents

features-sections-epinglees-fond-evolutif-html-tailwind.zip3 files · 8 Ko

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

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A six-cell bento grid: key figures, SVG sparklines, a quote and icons. All the text is in the HTML and the animation is CSS only, with no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three cards in saturated flat colours (yellow, pink, electric blue) with high-contrast text and a dark variant. Every colour pair is measured at AA: 5.5:1 at worst.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Six features as frosted glass cards over a slowly drifting aurora mesh gradient. Pause button, still background under prefers-reduced-motion, CSS and a light script.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A two-offer table: checked rows, a column highlighted from top to bottom and one call-to-action button per offer. Pure HTML and CSS, no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component