transform-style
Widely availableSince 201597% of users
Determines if child elements should be rendered 'flat' against their parent or if they should exist in their own 3D space. You need it for 3D scenes (like a rotating cube) where children share the same 3D space.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassicIt has worked everywhere since September 2015.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
flat- Inherited
- No
- Applies to
- transformable elements
- Animation type
- discrete
Quick example
.cube-container {
/* Allows nested elements to stick out or hide behind each other in true 3D space */
transform-style: preserve-3d;
perspective: 1000px;
}Values
flatpreserve-3dtransform-style browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
36+
16+
9+
12+Mobile
36+Android
16+Android
9+iOS