CardsPremium

Poster Pop-Out 3D

A poster that tips backwards while its character, cut out on a second image, rises and breaks out through the top of the frame. On hover, focus or tap.

CSS 3DHoverPoster

Updated

This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Cards has 43 effects, including 6 free. Explore the category →

3 usage examples

Saturday's fantasy double feature — an open-air cinema's programme — Poster Pop-Out 3D example 1

① Saturday's fantasy double feature — an open-air cinema's programme

WhenOn the programme page, the night's two films sit side by side on a dark band, the showtime as overline. The pointer moves over one: its character steps out. Under each poster, running time, version and a “Book” button.
WhyTwo still posters look alike; the one under the pointer stages itself, and picking a showing becomes a small piece of cinema.
SettingsTwo roots holding one poster each, --ppo-w: 112px, transparent root background on a #0a0a0f band. Opened by the component's own hover and focus, no scene script. Images: the code's two demo posters.
Readers' prize, vote for your fantasy novel — a public library's website — Poster Pop-Out 3D example 2

② Readers' prize, vote for your fantasy novel — a public library's website

WhenTwo shortlisted covers fill the page. Clicking one (or pressing Enter) records the vote: its hero stays out of the book, a green outline frames it and “Your vote: …” appears in the header. Clicking the other moves the vote.
WhyThe choice shows without a checkbox: the chosen book stays open, the other one closes.
SettingsOne root, two posters at --ppo-w: 132px, 78 px apart, made clickable by the page (role="button", aria-pressed). The page script sets the ppo-on class, provided by the CSS, on the chosen cover. A click outside the covers closes it (the component's behaviour); the vote shown stays.
“New hero unlocked” in the corner — a turn-based strategy game — Poster Pop-Out 3D example 3

③ “New hero unlocked” in the corner — a turn-based strategy game

WhenThe mission is won: a notification slides up at the bottom right of the game map, with a mini poster of the Storm Mage. The poster opens by itself and the character pokes out above the notification.
WhyA reward announced by a small movement, with no window interrupting the game.
Settings--ppo-w: 74px poster inside a 246 px notification, not focusable (tabindex="-1"). The page sets and removes ppo-on; for the capture it replays the opening in a loop (1.2 s open, 0.8 s closed).

How it works

Each .ppo-card stacks two images with the same framing: the full poster (.ppo-poster, clipped by .ppo-frame) and the character alone on a transparent background (.ppo-cutout), placed outside the clipped frame. At rest they match exactly and you only see a poster. A dark gradient (.ppo-scrim) carries the overline and title at the bottom, written as HTML text.

Everything hangs on one variable, --ppo-o, going from 0 to 1. The body pivots 22° backwards (rotateX), the character rises by 20 % of the height, moves 40 px towards the viewer and grows 4 %, with a shadow and a back-light in the --ppo-glow colour. The poster darkens slightly, the title comes 68 px forward and a blurred halo lights up on the floor. Duration: 0.6 s, on a curve that brakes at the end.

The variable is 1 on hover (only on screens that can hover), on keyboard focus, or when the script sets the ppo-on class after a tap. A second tap closes it, as does a tap elsewhere or the Escape key. With a mouse, the script adds a subtle tilt that follows the pointer (±5° sideways, ±3° up and down). The demo loads its four images from effect-labs.com: replace them with your own.

Accessibility

  • Real text: overline and title are HTML, read by screen readers and translatable. The poster has a descriptive alt; the cut-out character, which repeats it, is hidden (alt="" and aria-hidden).
  • Keyboard: each poster is a tab stop (tabindex="0", role="group" with an aria-label). Focus opens it like hover, with a violet outline 8 px from the edge. If the poster holds a link or button, its focus opens the card too (:has(:focus-visible)).
  • Touch: no sticky hover; one tap opens, a second closes, and opening a poster closes the others. A link or button inside keeps its job: tapping it opens nothing.
  • Reduced motion: no tipping, rising or pointer tilt. Opening becomes a fade: the poster drops to 45 % opacity and the character, unmasked, stands out through a coloured glow.
  • Reduced transparency: with prefers-reduced-transparency (or the ppo-hc class on .ppo-scene), the bottom of the poster becomes an opaque black band under the title and the floor halo goes away.

Browser compatibility

3D transforms, mask-image, color-mix() in the character's filter, :has() for focus inside. Measured on the sold code in Chromium 149, Firefox 151 and WebKit 26.5: hover, keyboard focus, touch (open, close, tap elsewhere) and 390 px width all correct, including with the code pasted twice. The test tool's WebKit flattens 3D: the real tipping in Safari is not checked.

Chrome 111+✓ Full (measured in Chromium 149)
Firefox 113+✓ Full (measured in Firefox 151); opening from a focused element inside from Firefox 121
Safari 16.2+✓ Behaviour measured in WebKit 26.5; 3D rendering in real Safari not checked
Edge 111+✓ Not checked (same engine as Chrome)
Mobile iOS 16.2+✓ Not checked on a device; touch measured in WebKit emulation
Android Chrome 111+✓ Measured in 390 px emulation: 96 px posters, touch works

A browser without color-mix() drops the character's whole filter: it still leaves the frame, without shadow or back-light. Without JavaScript, hover and focus still work; only tapping opens nothing.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0843-root">
  <div class="ppo-scene">
    <div class="ppo-card" tabindex="0" role="group" aria-label="…" style="--ppo-glow:#ff4a1f">
      <div class="ppo-tilt">
        <div class="ppo-body">
          <div class="ppo-frame"><img class="ppo-poster" src="affiche.webp" alt="…"></div>
          <img class="ppo-cutout" src="personnage.webp" alt="" aria-hidden="true">
          <span class="ppo-scrim" aria-hidden="true"></span>
          <div class="ppo-caption">
            <span class="ppo-kicker">…</span>
            <strong class="ppo-title">…</strong>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Images (HTML — src of .ppo-poster and .ppo-cutout) Four images hosted on effect-labs.com (demo) Host your files on your own site. The character must have exactly the framing of the poster (same format, 2:3 advised, e.g. 600 × 900) on a transparent background, as PNG or WebP.
Poster width (CSS — --ppo-w on .ppo-scene) clamp(96px, 24vw, 118px) Every size follows from it: perspective, top room for the character to rise, halo blur, title size.
Tip and rise (CSS — --ppo-tilt, --ppo-rise) 22° and -20 % 12° and -12 % for a quieter effect; beyond -25 %, leave more room above the row.
Halo colour (CSS — --ppo-glow on each .ppo-card) #ff4a1f and #4f8dff in the demo Use the poster's dominant colour: it tints the character's back-light and the floor glow.
Focus outline (CSS — --ppo-accent) #a78bfa Pick a colour that stands out from your page background.
Duration (CSS — .6s in the transition rules) 0.6 s Use 0.4 s for a brisker move; keep the same value on .ppo-body, .ppo-cutout and .ppo-caption.
Shelf with a button (CSS — .ppo-shelf, .ppo-meta, .ppo-btn) Not used Classes for a titled row where each poster, as it opens, reveals a line of details and a button.

FAQ

Parallax Layers stacks three planes at different depths inside the card: everything stays within the frame. Here the subject leaves the picture: the cut-out character climbs out of the top while the poster falls back. So each card needs two images, the poster and its character.
Start from the poster itself, cut the character out without moving or resizing it, and export it on a transparent background at the same size. The bottom of that image is faded by a mask (from 76 % to 97 % of the height), so the feet blend into the scenery instead of ending in a hard line.
The four demo images (two posters, two cut-out characters) are hosted on effect-labs.com. Replace them with your own: change the src of both images in each card, and rewrite the poster's alternative text and the title at the same time.