Backface Visibility Property

Last updated: 2026-09-13

backface-visibility Backface Visibility Property

The backface-visibility property controls whether an element is visible when, after a 3D rotation, its back faces the viewer. The default value visible shows the front content mirrored on the back; with hidden, the element is invisible when its back faces the viewer. This is commonly used for card flips, cubes, and other 3D effects that distinguish the front from the back.

Category
Initial Valuevisible
InheritedNo
Applies To
Animation Type
CSS VersionCSS3
StatusStandard

📝 Syntax

backface-visibility: visible | hidden;

⚙️ Values

ValueTypeDescription
visible | hiddenKeywordWhether the back face is visible

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
backface-visibility v36 v12 v16 v9 v23
Supported in all major browsers
Important: backface-visibility only takes effect under 3D transforms (transform-style: preserve-3d); a 2D rotation never shows a back face.
Tip: In a card flip, both faces need backface-visibility: hidden, and the back face is pre-rotated with rotateY(180deg) so it sits behind.

❓ FAQ

QWhy do I see mirrored text after flipping an element with CSS?
AThe default is backface-visibility: visible, so when the back of an element faces the viewer, the front content is shown mirrored — like a transparent reflection. For a proper card flip, set backface-visibility: hidden on both faces and pre-rotate the back face with rotateY(180deg); during the flip the two faces become visible alternately.
QDoes the backface-visibility property affect rendering performance?
AWith hidden, the browser can skip the work of painting the invisible back face, which can actually improve rendering performance in 3D scenes — a recommended practice. By contrast, visible keeps both faces painted at all times. For performance-sensitive cases with many 3D cards, set hidden uniformly and control visibility as needed.
QDoes backface-visibility work with 2D rotations in CSS transforms?
ANo, it is meaningless there. A 2D rotation such as rotate 45deg never turns the element around, so the back never faces the viewer and backface-visibility does not kick in. It only matters under 3D transforms: when rotateY(180deg) or rotateX(180deg) turns the element away from the viewer, hidden hides the back face.
QHow do I build a 3D card flip effect with backface-visibility?
AFour steps: set transform-style: preserve-3d on the parent container; absolutely position the front and back children on top of each other and give both backface-visibility: hidden; pre-rotate the back face with rotateY(180deg); then rotate the parent to rotateY(180deg) on interaction. Combined with a transition, you get a smooth flip.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏