CSS backface-visibility
Control whether the back of a 3D-rotated element is visible. Hover to flip.
backface-visibility: visible
Front
Back
backface-visibility: hidden
visible (default)
The back side is shown as a mirror image when rotated. You see both front and back at all times.
hidden
The back side is invisible. Essential for card flip effects — place two elements back-to-back and only the front-facing one shows.
.card {
perspective: 600px;
}
.card-inner {
transform-style: preserve-3d;
transition: transform 0.6s;
}
.card:hover .card-inner {
transform: rotateY(180deg);
}
.card-front, .card-back {
backface-visibility: hidden;
position: absolute;
inset: 0;
}
.card-back {
transform: rotateY(180deg);
}