backface-visibility
suggest changeThe backface-visibility
property relates to 3D transforms.
With 3D transforms and the backface-visibility
property, you’re able to rotate an element such that the original front of an element no longer faces the screen.
For example, this would flip an element away from the screen:
<div class="flip">Loren ipsum</div>
<div class="flip back">Lorem ipsum</div>
.flip {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
-webkit-backface-visibility: visible;
-moz-backface-visibility: visible;
-ms-backface-visibility: visible;
}
.flip.back {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
}
Firefox 10+ and IE 10+ support backface-visibility
without a prefix. Opera, Chrome, Safari, iOS, and Android all need -webkit-backface-visibility
.
It has 4 values:
- visible (default) - the element will always be visible even when not facing the screen.
- hidden - the element is not visible when not facing the screen.
- inherit - the property will gets its value from the its parent element
- initial - sets the property to its default, which is visible
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents