This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The transform-style CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
If flattened, the element's children will not exist on their own in the 3D-space.
As this property is not inherited, it must be set for all non-leaf descendants of the element.
Syntax
/* Keyword values */ transform-style: flat; transform-style: preserve-3d; /* Global values */ transform-style: inherit; transform-style: initial; transform-style: unset;
Values
flat- Indicates that the children of the element are lying in the plane of the element itself.
preserve-3d- Indicates that the children of the element should be positioned in the 3D-space.
Formal syntax
flat | preserve-3d
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Transforms Level 2 The definition of 'transform-style' in that specification. |
Editor's Draft | Initial definition. |
| Initial value | flat |
|---|---|
| Applies to | transformable elements |
| Inherited | no |
| Media | visual |
| Computed value | as specified |
| Animation type | discrete |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
| Creates stacking context | yes |
Browser compatibility
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Chrome
Full support
12
| Edge
Full support
12
| Firefox
Full support
16
| IE No support No | Opera
Full support
15
| Safari
Full support
Yes
| WebView Android
Full support
3
| Chrome Android ? | Edge Mobile
Full support
Yes
| Firefox Android
Full support
16
| Opera Android
Full support
Yes
| Safari iOS
Full support
Yes
| Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- User must explicitly enable this feature.
- User must explicitly enable this feature.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.