Transform-style - Property CSS
Summary of characteristics of the transform-style property
flat | preserve-3dflatDiscrète: during an animation, the transform-style property passes from one value to another without transition.Single: single value (no order).Syntax diagram of transform-style.
transform-style property.The links in the diagram provide more details about the values.
Description of the transform-style property.
The property transform-style defines how the children of the element behave when the latter undergoes a 3D transformation. More specifically,
transform-style} defines whether the children of the element have their own 3D space or whether they are always in the same plane as the parent.
In the example below, the parent element is in blue, and the child element is in green. The latter has been rotated 45 degrees around the X-axis.
This rotation has taken it out of the plane of its parent. This is clearly visible in the result, because the property transform-style has been
set to the value preserve-3d.
Several other properties interfere with transform-style and force the children to stay in the parent's plane:
overflow: with a value different fromvisibleorclipopacity: when the opacity is less than 1 (semi-transparent or transparent element).filter: as soon as a graphic filter is applied (blur, hue change, etc.)clip: any value other thanauto.clip-path: any value other thannone.isolation: with the valueisolate.mask-image: any value other thannone.mask-border-source: any value other thannone.mix-blend-mode: any value other thannormal.contain: with the valuepaint.
Values for transform-style.
- transform-style: flat;
Default value. Child elements do not have their own 3D space: they can only remain in the same plane as the parent element.
transform-style:flat; - transform-style: preserve-3d;
The child elements have their own 3D space, which allows for more realistic rendering of 3D effects.
transform-style:preserve-3d; - transform-style: initial; (
flat) transform-style: inherit; transform-style: revert; transform-style: revertLayer; transform-style: unset;See the following pages for more details:
initial,inherit,revert,revert-layer,unset.
Animation of the transform-style property.
The example below is made up of a blue element (the parent), containing a green element (which is therefore its child). The parent has been rotated around the X axis by 60 degrees, while the child element has been moved up (Z axis) by 30 pixels.
The animation is done on the property transform-style. When the latter takes the value flat, the offset of the
green element no longer appears: the child element remains confined to the plane of its parent.
Simulator.
The simulator below shows two constructions, each made up of a parent element (blue) containing a child element (green). In flat mode,
it is impossible to see the transformations that have been applied to the child element, because it remains in the parent's plane and rotates with it.
In the first example, the child element is even invisible because it has been rotated 90° around the vertical axis (Y).
In preserve-3d mode, one can see the transformations that have been applied to each of the child elements.
Browsers compatibility with transform-style.
All recent browsers correctly handle the property transform-style.
the backface-visibility property.transform-style which defines how the children of a 3D transformed element behave.Notes:
(1) Does not support 2D transformations on SVG elements. Use the transform attribute instead.
(2) Internet Explorer does not support transform-style:preserve-3d, thus limiting the nesting of animations.
transformations
transformations
transform-styleproperty
Browsers on computers :
Mobile browsers :
Outdated or marginal browsers :

Internet Explorer

KaiOS Browser

Opéra Mobile

Opéra

Firefox pour Androïd

Samsung Internet

Chrome

Edge

Firefox

Androïd Brower

Chrome pour Androïd

Baidu Browser

QQ Browser

Safari

Safari sur IOS

UC Browser pour Androïd

Opéra mini
Historic of the transform-style property.
-
CSS Transforms Module Level 2
In addition to the 2D transformations already presented in level 1 of the specification, this module deals with 3D transformations. It introduces new properties to manage the viewpoint height and the rendering of 3D effects.
This module also introduces the individual properties of rotation, translation, and zoom effect.Regardingtransform-style. This level of the specification introduces 3D transformations.
Addingtransform-styleproperty.March 03, 2020Working Draft.
See also, regarding the transformations.
LThe CSS Transforms Module describes the property transform-style, and also includes all definitions concerning CSS transformations:
Properties:

Functions:





