{"id":13980,"date":"2011-08-31T20:06:32","date_gmt":"2011-09-01T03:06:32","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=13980"},"modified":"2023-02-01T07:27:24","modified_gmt":"2023-02-01T15:27:24","slug":"backface-visibility","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/b\/backface-visibility\/","title":{"rendered":"backface-visibility"},"content":{"rendered":"\n

The backface-visibility<\/code> property relates to 3D transforms. With 3D transforms, you can manage to rotate an element so what we think of as the “front” of an element no longer faces the screen. For instance, this would flip an element away from the screen:<\/p>\n\n\n\n

.flip {\n  transform: rotateY(180deg);\n}<\/code><\/pre>\n\n\n\n

It will look as if you picked it up with a spatula and flipped it over like a pancake. That’s because the default for backface-visibility<\/code> is visible<\/code>. Instead of it being visible, you could hide it.<\/p>\n\n\n\n

.flip {\n  transform: rotateY(180deg);\n  backface-visibility: hidden;\n}<\/code><\/pre>\n\n\n

Syntax<\/h3>\n\n\n
backface-visibility: visible | hidden;<\/code><\/pre>\n\n\n\n
    \n
  • Initial value:<\/strong> visible<\/code><\/li>\n\n\n\n
  • Applies to:<\/strong> transformable elements<\/li>\n\n\n\n
  • Inherited:<\/strong> no<\/li>\n\n\n\n
  • Percentages:<\/strong> n\/a<\/li>\n\n\n\n
  • Computed value:<\/strong> specific keyword<\/li>\n\n\n\n
  • Animation type:<\/strong> discrete<\/li>\n<\/ul>\n\n\n

    Values<\/h3>\n\n\n
      \n
    • visible<\/code><\/strong> (default) – The element will always be visible even when not facing the screen.<\/li>\n\n\n\n
    • hidden<\/code><\/strong> – The element is not<\/em> visible when not facing the screen.<\/li>\n\n\n\n
    • inherit<\/code><\/strong> – The property gets its value from the its parent element.<\/li>\n\n\n\n
    • initial<\/code><\/strong> – Sets the property to its default, which is visible<\/code>.<\/li>\n<\/ul>\n\n\n

      Demo<\/h3>\n\n\n