20 CSS Cards with Animations 03 / 20
3D Flip Card
Pure CSS 3D flip using transform-style: preserve-3d and rotateY with backface-visibility: hidden on both faces.
The code
<div class="stage-3">
<div class="flip-scene">
<div class="flip-card">
<div class="flip-front">
<h4>Hover to Flip</h4>
<p style="font-size: 10px; color: var(--ccg-muted)">3D card flip effect →</p>
</div>
<div class="flip-back">
<h4>The Back Side</h4>
<p>Revealed with CSS 3D perspective</p>
</div>
</div>
</div>
</div> <div class="stage-3">
<div class="flip-scene">
<div class="flip-card">
<div class="flip-front">
<h4>Hover to Flip</h4>
<p style="font-size: 10px; color: var(--ccg-muted)">3D card flip effect →</p>
</div>
<div class="flip-back">
<h4>The Back Side</h4>
<p>Revealed with CSS 3D perspective</p>
</div>
</div>
</div>
</div>.flip-scene {
width: 190px;
height: 120px;
perspective: 700px;
cursor: pointer;
}
.flip-card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.flip-scene:hover .flip-card {
transform: rotateY(180deg);
}
.flip-front,
.flip-back {
position: absolute;
inset: 0;
border-radius: 14px;
backface-visibility: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 16px;
}
.flip-front {
background: linear-gradient(135deg, #1a1a2e, #16213e);
border: 1px solid rgba(124, 108, 255, 0.3);
}
.flip-front h4 {
font-size: 13px;
font-weight: 700;
color: #fff;
margin-bottom: 4px;
}
.flip-front p {
font-size: 10px;
color: var(--ccg-muted);
}
.flip-back {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
transform: rotateY(180deg);
}
.flip-back h4 {
font-size: 13px;
font-weight: 700;
color: #fff;
margin-bottom: 4px;
text-align: center;
}
.flip-back p {
font-size: 10px;
color: rgba(255, 255, 255, 0.8);
text-align: center;
}
/* parent stage backdrop (so the demo renders standalone) */
[class^="stage-"] {
width: 100%;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 2.5rem 1.5rem;
box-sizing: border-box;
}
.stage-3 {
background: #0d0d14;
}
/* gallery vars + keyframes (so the demo renders standalone) */
:root {
--ccg-bg: #0a0a0f;
--ccg-surface: #111118;
--ccg-surface2: #17171f;
--ccg-surface3: #1e1e28;
--ccg-border: rgba(255, 255, 255, 0.15);
--ccg-border2: rgba(255, 255, 255, 0.13);
--ccg-accent: #7c6cff;
--ccg-pink: #ff6c8a;
--ccg-green: #1ed98a;
--ccg-amber: #f5a84a;
--ccg-cyan: #3de8f5;
--ccg-text: #f0eeff;
--ccg-muted: #6b6987;
--ccg-label: #9896b8;
--ccg-mono: "DM Mono", "Fira Code", monospace;
--ccg-sans: "Syne", sans-serif;
} .flip-scene {
width: 190px;
height: 120px;
perspective: 700px;
cursor: pointer;
}
.flip-card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.flip-scene:hover .flip-card {
transform: rotateY(180deg);
}
.flip-front,
.flip-back {
position: absolute;
inset: 0;
border-radius: 14px;
backface-visibility: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 16px;
}
.flip-front {
background: linear-gradient(135deg, #1a1a2e, #16213e);
border: 1px solid rgba(124, 108, 255, 0.3);
}
.flip-front h4 {
font-size: 13px;
font-weight: 700;
color: #fff;
margin-bottom: 4px;
}
.flip-front p {
font-size: 10px;
color: var(--ccg-muted);
}
.flip-back {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
transform: rotateY(180deg);
}
.flip-back h4 {
font-size: 13px;
font-weight: 700;
color: #fff;
margin-bottom: 4px;
text-align: center;
}
.flip-back p {
font-size: 10px;
color: rgba(255, 255, 255, 0.8);
text-align: center;
}
/* parent stage backdrop (so the demo renders standalone) */
[class^="stage-"] {
width: 100%;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 2.5rem 1.5rem;
box-sizing: border-box;
}
.stage-3 {
background: #0d0d14;
}
/* gallery vars + keyframes (so the demo renders standalone) */
:root {
--ccg-bg: #0a0a0f;
--ccg-surface: #111118;
--ccg-surface2: #17171f;
--ccg-surface3: #1e1e28;
--ccg-border: rgba(255, 255, 255, 0.15);
--ccg-border2: rgba(255, 255, 255, 0.13);
--ccg-accent: #7c6cff;
--ccg-pink: #ff6c8a;
--ccg-green: #1ed98a;
--ccg-amber: #f5a84a;
--ccg-cyan: #3de8f5;
--ccg-text: #f0eeff;
--ccg-muted: #6b6987;
--ccg-label: #9896b8;
--ccg-mono: "DM Mono", "Fira Code", monospace;
--ccg-sans: "Syne", sans-serif;
}More from 20 CSS Cards with Animations
Skeleton Loader CardMagazine Card3D Mouse Tilt CardCursor Spotlight CardInteractive Vote CardGlassmorphism CardNeon Gradient Border CardAnimated Gradient Border CardStacked Paper CardHolographic Shimmer CardSlide Reveal CardMorphing Blob Card
View the full collection →