Mouse parallax
Also called: depth layers / 2.5D image
A scene built from layers (sky, mountains, forest, title) moves at different speeds as the mouse moves, like a 3D window. With no mouse, the scene sways slowly on its own.

When to use it
For the top of a tourism, game, event, portfolio or campaign page, when you have an illustration (or cut-out photo) split into transparent PNG/SVG layers. Give each layer data-profundidade: 0 at the back, 1 in front. Text can be a layer too. Tune data-forca for more or less motion and use data-passeio="nao" if you want everything still until the mouse arrives. Image layers are oversized so the edges never show.
How to add it to your site
- Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
- Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
- Done: the AI adds the effect to your project, just like you saw it here.
Use it in HTML
The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:
<div data-efeito="imagem-profundidade" data-forca="36" style="height:460px">
<img src="ceu.png" alt="" data-profundidade="0">
<img src="montanhas.png" alt="" data-profundidade="0.5">
<img src="mata.png" alt="" data-profundidade="1">
</div>
More images effects
- Image comparison sliderAntes e depois
- Filterable galleryFLIP grid
- Halftone imagedot matrix photo reveal
- Liquid image distortionWebGL hover ripple
- Pixel revealImagem que se forma em pixels
- Ken Burns slideshow with captionsphoto story
- Image lensmagnifier
- Tile revealmosaic image reveal