HTML DOM Style transformStyle property
Examples
Let the child elements are converted to retain its 3D conversion:
document.getElementById("myDIV").style.transformStyle="preserve-3d";
try it"
Definition and Usage
transformStyle property sets or returns the nested elements how to render in 3D space.
Note: This property must transform used with the property.
Browser Support
Firefox support transformStyle property.
Chrome, Safari and Opera support another alternative of the property attribute that WebkitTransformStyle property.
grammar
Back transformStyle properties:
object .style.transformStyle
Setting transformStyle properties:
object .style.transformStyle="flat|preserve-3d|initial|inherit"
Property Value
值 | 描述 |
---|---|
flat | 默认值。子元素将不保留其 3D 位置。 |
preserve-3d | 子元素将保留其 3D 位置。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | flat |
---|---|
return value: | String representing the transform-style property element. |
CSS version | CSS3 |
related articles
JavaScript Style objects: the Transform property
CSS Reference Manual: the Transform-style property