CSSRotate: y property

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

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

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

The **y** property of the {{domxref("CSSRotate")}} interface represents the y-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.y.value); // 1

rotate.y = 0;
console.log(rotate.y); // CSSUnitValue {value: 0, unit: "number"}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also