vibran

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.

Preview of Mouse parallax running live
Copy the promptAdjust colors and speed

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

  1. 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.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. 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

All 11 images effects →