Style transformStyle attribute
- Previous page transformOrigin
- Next page transition
- Go back to the previous level Objects HTML DOM Style
Definition and usage
transformStyle
Sets or returns the presentation method of nested elements in 3D space. See
Note:This attribute must be with transform attribute Used together.
See also:
JavaScript Style Object:transform attribute
CSS Reference Manual:transform-style attribute
Example
Let the converted child elements retain 3D transformation:
document.getElementById("myDIV").style.transformStyle = "preserve-3d";
Syntax
Return transformStyle attribute:
object.style.transformStyle
Set transformStyle attribute:
object.style.transformStyle = "flat|preserve-3d|initial|inherit"
Attribute value
Value | Description |
---|---|
flat | Default value. Child elements will not retain their 3D position. |
preserve-3d | The child elements will retain their 3D position. |
initial | Set this attribute to its default value. See initial. |
inherit | This attribute inherits from its parent element. See inherit. |
Technical details
Default value: | flat |
---|---|
Return value: | A string that represents the transform-style attribute. |
CSS version: | CSS3 |
Browser support
Table numbers indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
36.0 | 11.0 | 16.0 | 9.0 | 23.0 |
- Previous page transformOrigin
- Next page transition
- Go back to the previous level Objects HTML DOM Style