backface-visibility
suggest changebackface-visibility controls whether an element is visible when a 3D transform turns its back toward the viewer:
.card {
position: relative;
transform-style: preserve-3d;
transition: transform 500ms ease;
}
.card[aria-pressed="true"] {
transform: rotateY(180deg);
}
.card__front,
.card__back {
backface-visibility: hidden;
}
.card__back {
position: absolute;
inset: 0;
transform: rotateY(180deg);
}
Its primary values are visible (the initial value) and hidden. CSS-wide values such as inherit, initial, revert, and unset are also accepted.
Modern browsers support transform and backface-visibility without prefixes. Ensure that hidden faces do not leave duplicate interactive controls in the focus order; synchronize visual state with appropriate HTML state or visibility.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents