CSSRotate: z property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("CSS Typed Object Model API")}} {{AvailableInWorkers}}

The **z** property of the {{domxref("CSSRotate")}} interface represents the z-coordinate of the vector denoting the axis of rotation.

Value

A {{domxref("CSSNumericValue")}}. If set to a number, this is wrapped in a {{domxref("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

{{Specifications}}

Browser compatibility

{{Compat}}

See also