Card Flip
Carta che si gira · Tarjeta que gira · Flip card · 3D card flip · Flashcard 3D
A card spins in 3D around its axis to reveal a back with more information, like a playing card turned over on the table. Used for flashcards, pricing, profiles and memory games.
- Era
- 2010 – today
- Use
- Mainstream
Live demo
View code
<main>
<div class="sc"><div class="card"><div class="f a"><small>parola</small><b>Farfalla</b><span>gira la carta</span></div><div class="f b"><small>English</small><b>Butterfly</b><span>✓ indovinato</span></div></div></div>
<div class="sc s2"><div class="card"><div class="f a c2"><small>parola</small><b>Luna</b><span>gira la carta</span></div><div class="f b c3"><small>English</small><b>Moon</b><span>✓ indovinato</span></div></div></div>
</main> body{margin:0;height:100vh;display:grid;place-items:center;overflow:hidden;background:#1E1B3A;font-family:'Bricolage Grotesque',sans-serif}
main{display:flex;gap:22px;max-width:92vw}
.sc{perspective:900px;width:150px;height:210px}
.card{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.f{position:absolute;inset:0;border-radius:18px;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;flex-direction:column;justify-content:space-between;padding:16px;box-sizing:border-box;box-shadow:0 18px 40px #0006}
.a{background:#F9F4E8;color:#1E1B3A;border:3px solid #F2B134}
.b{background:#F2B134;color:#1E1B3A;transform:rotateY(180deg)}
.c2{border-color:#3FA7A0}.c3{background:#E85D75;color:#F9F4E8}
small{font-weight:500;font-size:11px;letter-spacing:.14em;text-transform:uppercase;opacity:.7}
b{font-weight:800;font-size:28px;line-height:1;letter-spacing:-.02em}
span{font-size:12px;font-weight:500}
@media (prefers-reduced-motion:no-preference){
.card{animation:flip 4.4s cubic-bezier(.4,.2,.2,1) infinite}
.s2 .card{animation-delay:.35s}
@keyframes flip{0%,30%{transform:rotateY(0)}45%,80%{transform:rotateY(180deg)}95%,100%{transform:rotateY(360deg)}}
} Characteristics
- Stacked front and back with backface-visibility hidden
- perspective on the container for depth
- 180 degree turn on Y or X
- Shadow shifting during the turn
- Triggered by click or hover (never hover-only on mobile)
Palette
Click a swatch to copy it
Typography
Headings · Bricolage Grotesque Card Flip
Body · Bricolage Grotesque A card spins in 3D around its axis to reveal a back with more information, like a playing card turned over on the table. Used for flashcards, pricing, profiles and memory games.
Motion
- Easing
cubic-bezier(0.4, 0.2, 0.2, 1) oppure molla con leggero rimbalzo- Typical duration
- 500–800 ms per giro
- Techniques
- transform rotateY / rotateX, transform-style preserve-3d, backface-visibility hidden, perspective, Framer Motion / GSAP con spring
Accessibility (reduced motion)
Replace the rotation with a cross-fade between front and back.
Prompt for your agent
Copy and paste into your prompt to have an agent or image generator reproduce this style.
For web pages and UI
Design the web page or interface in this style: Card Flip (Carta che si gira, Tarjeta que gira). A card spins in 3D around its axis to reveal a back with more information, like a playing card turned over on the table. Used for flashcards, pricing, profiles and memory games. Characteristics: Stacked front and back with backface-visibility hidden, perspective on the container for depth, 180 degree turn on Y or X, Shadow shifting during the turn, Triggered by click or hover (never hover-only on mobile). Palette: #1E1B3A, #F9F4E8, #F2B134, #E85D75, #3FA7A0. Typography: headings in Bricolage Grotesque, body text in Bricolage Grotesque (Google Fonts or equivalents). Mood: playful, tactile, bold. Motion: easing cubic-bezier(0.4, 0.2, 0.2, 1) oppure molla con leggero rimbalzo, typical duration 500–800 ms per giro; techniques: transform rotateY / rotateX, transform-style preserve-3d, backface-visibility hidden, perspective, Framer Motion / GSAP con spring. With prefers-reduced-motion: Replace the rotation with a cross-fade between front and back. References: MDN «backface-visibility», David DeSandro «Intro to CSS 3D transforms», Anki e app di flashcard.
Relations
Similar to
References
- MDN «backface-visibility»
- David DeSandro «Intro to CSS 3D transforms»
- Anki e app di flashcard