3D✨ Premium

Fold Effect Card

A 200 × 160 px card cut into two halves that pivot 30° around the center line in 0.5 s: their outer edges move toward you and the card hollows into a V, like a sheet being creased. Hover, Tab or a tap fold it, with no JavaScript; under reduced motion, a shadow along the crease replaces the motion.

CSS3DFold

Updated

This effect is part of Effect.Labs — 840 vanilla effects, some free, some premium. 3D has 50 effects, including 8 free. Explore the category →

3 usage examples

Two-panel leaflet — "Brochures" page of a tourist office — Fold Effect Card example 1

① Two-panel leaflet — "Brochures" page of a tourist office

WhenThe "Loire Valley bike routes" leaflet in the middle of the brochures page, between two thumbnails: top panel "6 marked loops, 18 to 52 km", bottom panel "Download the PDF (2 MB)". On hover, the leaflet takes its crease like paper picked up in the hand.
WhyThe symmetric V fold instantly recalls a paper document folded in two; no other effect in the category folds a surface down its middle.
SettingsCard enlarged to 320 × 220 px (110 px halves), perspective brought in to 800 px to keep the fold readable; top panel linear-gradient(160deg, #3f8f7d, #2b6f8f) with a sun and a route drawn in CSS, cream bottom panel with an orange button; transition-delay: .35s on hover, so it does not fold when the mouse just passes by.
Folded place card at a wedding table — website of a wedding planner — Fold Effect Card example 2

② Folded place card at a wedding table — website of a wedding planner

WhenJeanne and Hugo's seating plan: the "Table 4 — Jeanne" place card set in the middle of the drawn table, plates around it, the list of the table's eight guests below. The card folds like a tent card standing on the tablecloth.
WhyA card folded into a V is exactly what a place card looks like; the effect gives the depth of paper without a photo.
Settings200 × 120 px card (60 px halves), 420 px perspective so a 30° fold shows on a small card; ivory paper #fffdf8 edged with a gold line drawn as an inner shadow, "TABLE 4" in small caps, first name in 24 px Georgia italic. Outside the capture path: the scene folds the card on its own in a loop (same transform as hover).
Folded "1-hour massage" gift card — online shop of a beauty salon — Fold Effect Card example 3

③ Folded "1-hour massage" gift card — online shop of a beauty salon

WhenThe salon's gift card page: what is included on the left (valid 1 year, sent by email or mail), the card in the center ("Good for" / "A hot oil massage, 1 hour"), the price and the "Give this card" button on the right. The card folds like a card about to slip into its envelope.
WhyThe light fold suggests the paper object you give, without opening it or turning it over.
Settings200 × 150 px card (75 px halves), 500 px perspective; burgundy top half #7a3e4a → #9c5563 with "Good for" in Georgia italic, pale pink bottom half #f9e6df → #f1d3ca. Outside the capture path: the scene folds the card on its own in a loop.

How it works

The root .fx-0013-root (#0a0a0f background, at least 300 px tall) centers the card .fold-card: 200 × 160 px, position: relative, perspective: 1000px and tabindex="0". Its two 80 px halves use position: absolute: .fold-top at the top (#6366f1 → #8b5cf6 gradient), .fold-bottom at the bottom (#8b5cf6 → #d946ef). The first turns on its bottom edge (transform-origin: center bottom), the second on its top edge (center top): both hinges meet on the center line.

When the card is hovered, or has focus (:focus-within), the top half gets rotateX(-30deg) and the bottom half rotateX(30deg), over 0.5 s. Both outer edges move 40 px toward you (80 px × sin 30°) while the crease stays in place: the card hollows into a V. Measured in Chromium 151 and Firefox 153: each half goes from 80 to 72 px tall on screen and its outer edge widens from 200 to 208 px, as perspective enlarges what comes closer. The motion is over in about 0.4 s.

Why the card carries its own height and position: relative: the halves use position: absolute, so they place themselves relative to the nearest positioned ancestor. The card must play that role, with a height equal to both halves: "top" stays on top, "bottom" at the bottom, and the area receiving the hover covers the whole card (200 × 160 px). The hover sits on the card rather than on the halves, so the pointer does not leave the area when the halves change shape.

Accessibility

  • Keyboard and touch: the card has tabindex="0" and every :hover rule is doubled by :focus-within. Tab folds it, the next Tab unfolds it; a 2 px #a5b4fc ring (:focus-visible) marks keyboard focus. On a touchscreen, a tap folds it, a tap elsewhere unfolds it. Measured in Chromium 151, Firefox 153 and WebKit 26. A mouse click also gives focus: the card stays folded until the next click elsewhere.
  • Reduced motion: under prefers-reduced-motion: reduce, a block scoped to .fx-0013-root removes the rotation of both halves (computed transform: none); an inner shadow fades in over 0.3 s on each side of the center line and marks the crease without motion.
  • Content: the fold hides nothing. Both halves stay readable, in HTML order (top then bottom), for screen readers as on screen; at 30°, the text is barely shortened (72 px tall instead of 80).
  • Contrast: 16 px semibold white text. Top half: 4.47:1 to 4.23:1; bottom half: 4.23:1 to 3.46:1, below the 4.5:1 threshold toward the magenta. Darken the end of the bottom gradient (for instance #c026d3, 4.71:1) if the card carries information.

Browser compatibility

CSS only (perspective, rotateX, transform-origin, backface-visibility, :focus-within, :focus-visible), no JavaScript, no dependencies. Measured in Chromium 151 and Firefox 153: same fold, same on-screen sizes, two independent copies on one page, shadow without motion under reduced motion. Playwright's WebKit (26.5) flattens all CSS 3D, even a reference cube: focus and touch are measured there, the 3D rendering was not checked on a real Safari.

Chrome 86+✓ Full
Firefox 85+✓ Full
Safari 15.4+✓ Focus and touch measured on WebKit; 3D rendering not checked on a real Safari
Edge 86+✓ Full
Mobile iOS 15.4+✓ Not checked on a real iPhone
Android Chrome✓ Full, with a tap

Without 3D transforms, the card stays flat: both halves remain readable one above the other, nothing is lost. Without :focus-visible, the browser's default focus outline shows instead.

The code

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

index.html — structure
<div class="fx-0013-root">
  <div class="demo-3d">
    <div class="fold-card" tabindex="0">
      <div class="fold-top">… moitié haute …</div>
      <div class="fold-bottom">… moitié basse …</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
Fold angle (CSS — rotateX(-30deg) and rotateX(30deg) in the hover rules) 30° Keep two opposite values. 15° gives a barely visible crease, 60° a card almost closed toward you (the halves drop to about 40 px tall on screen). Beyond 90°, the hidden back faces make the halves disappear.
Fold direction (CSS — signs of both angles) top −30°, bottom +30°: edges toward you Swap the signs (top 30deg, bottom -30deg): the edges move away and the center line seems to come forward, like a greeting card standing open.
Perspective (CSS — perspective of .fold-card) 1000px Smaller, the V reads better: 500 px on a 150 px tall card, 420 px on a 120 px place card. Larger, the fold becomes almost invisible from the front.
Size (CSS — width and height of .fold-card, height of both halves) 200 × 160 px, 80 px halves The card's height must stay twice the height of one half: change both together, or an empty band appears in the middle or the halves overlap.
Duration (CSS — transition of both halves) .5s (ease curve) .3s gives a crisp fold, .8s a heavy paper. Keep the same duration on both halves for a symmetric V.
Colors and focus ring (CSS — gradients of .fold-top and .fold-bottom, :focus-visible) #6366f1 → #8b5cf6, #8b5cf6 → #d946ef, ring #a5b4fc A gradient that continues from one half to the other reads as a single sheet. Two distinct colors read as two panels instead. On a white page, pick a dark ring.

FAQ

Fold Effect Card bends both halves 30° each and hides nothing: it is the depth of a folded sheet. Folding Panel lifts a single half through a full half turn and uncovers a hidden face beneath. Use the fold to give substance to a paper object (leaflet, place card, gift card), the flap to reveal information.
Yes: place the halves side by side (left: 0 and right: 0, 50% wide each, full height), give transform-origin: right center to the left half and left center to the right one, and replace the rotations with rotateY(30deg) on the left and rotateY(-30deg) on the right. The outer edges will move forward the same way, like a half-open book.
Its two halves use position: absolute: they give the card no height. So the card carries 160 px and position: relative itself, so the halves sit inside its frame and the hover area covers everything. If one half's text gets longer, raise the height of the halves and the card together.