Hide the backside of a rotating <div> element:
document.getElementById("myDIV").style.backfaceVisibility = "hidden";
Try it Yourself »
The backfaceVisibility property defines whether or not an element should be visible when not facing the screen.
This property is useful when an element is rotated, and you do not want to see its backside.
CSS reference: The backface-visibility Property
Return the backfaceVisibility property:
object.style.backfaceVisibility
Set the backfaceVisibility property:
object.style.backfaceVisibility = "visible|hidden|initial|inherit"
Value | Description |
---|---|
visible | Default value. The backside is visible |
hidden | The backside is not visible |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | visible |
---|---|
Return Value: | A String, representing the backface-visibility property of an element |
CSS Version | CSS3 |
backfaceVisibility
is a CSS3 (1999) feature.
It is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!