Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style transformStyle property

Style transformStyle property

Style Object Reference The Style object

Example

Let the transformed child elements retain their 3D transformations:

document.getElementById("myDIV").style.transformStyle="preserve-3d";

Try it »


Definition and Usage

The transformStyle property sets or returns how nested elements are rendered in 3D space.

**Note:** This property must be used with transform property.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Firefox supports the transformStyle property.

Chrome, Safari and Opera support another property that can replace this 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"

Attribute values

Value Description
flat Default. The child elements will not retain their 3D positions.
preserve-3d The child elements will retain their 3D positions.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

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 Manual:transform-style property


Style Object Reference The Style object