SanWebCorner / CSS tutorial

Simple CSS parallax effect

A scrollable landscape made entirely with HTML and CSS.

Live demo — scroll inside this panel
Focus the panel and use Page Down, your mouse wheel, or a touch swipe. With reduced motion enabled, the scene scrolls without the depth effect.

01 / THE VIEW

A little perspective.

Scroll down. The mountain scene moves more slowly than these cards, creating depth with CSS.

02 / THE TECHNIQUE

Two speeds. One scene.

The background sits farther from the viewer. The text stays on the front plane and remains readable.

03 / THE FINISH

Keep motion optional.

The demo becomes a normal scrolling scene when reduced motion is requested. You have reached the end.

Customize this demo in index.html and style.css. No installation required.