Style transformStyle Property
Example
Make the converted child elements retain their 3D transformation:
document.getElementById("myDIV").style.transformStyle="preserve-3d";
Try it Yourself »
Definition and Usage
The transformStyle property sets or returns how nested elements are rendered in 3D space.
Note:This property must be used together withtransformthe property.
Browser Support
![]()
Firefox supports the transformStyle property.
Chrome, Safari, and Opera support an alternative property, namely the WebkitTransformStyle property.
Syntax
Return the transformStyle property:
object.style.transformStyle
Set the transformStyle property:
object.style.transformStyle="flat|preserve-3d|initial|inherit"
Property Values
| Value | Description |
|---|---|
| flat | Default value. Child elements will not preserve their 3D position. |
| preserve-3d | Child elements will preserve their 3D position. |
| initial | Set this property to its default value. Seeinitial。 |
| inherit | Inherit this property from its parent element. Seeinherit。 |
Technical Details
| Default value: | flat |
|---|---|
| Return value: | A string representing the transform-style property of an element. |
| CSS Version | CSS3 |
Related Articles
JavaScript Style Object:transform property
CSS Reference:transform-style property
Other Extensions
Style Object