Stars
Mountains
Trees

Parallax Effect

Scroll down to see how different layers move at different speeds, creating a sense of depth and immersion.

How Parallax Works

Parallax scrolling is a technique where background images move slower than foreground images, creating an illusion of depth as you scroll. This effect is achieved by moving different layers at different speeds relative to the scroll position.

In this example, we're using Framer Motion to track the scroll progress and transform the position of each layer accordingly. The stars in the background move slowest, while the trees in the foreground move fastest.