CSSRotate: z property
CSS Typed Object Model API
CSS Typed Object Model API
The z property of the CSSRotate interface represents the z-coordinate of the vector denoting the axis of rotation.
Value
A CSSNumericValue. If set to a number, this is wrapped in a CSSUnitValue of unit: "number".
Examples
Reading and setting the rotation axis
const rotate = new CSSRotate(1, 1, 0, CSS.deg(45));
console.log(rotate.z.value); // 0
rotate.z = 1;
console.log(rotate.z); // CSSUnitValue {value: 1, unit: "number"}
Specifications
Browser compatibility
See also
- CSSRotate()
- CSSRotate.x
- CSSRotate.y
- CSSRotate.angle
- Using the CSS Typed OM
- CSS Typed Object Model API