CSSRotate: z property

Baseline 2026
Newly available

Since November 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Note: This feature is available in Web Workers.

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

js
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

Specification
CSS Typed OM Level 1
# dom-cssrotate-z

Browser compatibility

See also