CSSRotate: angle 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.
Want more browser support for this feature? Tell us why.
Note: This feature is available in Web Workers.
The angle property of the CSSRotate interface represents the angle of rotation.
A positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
Value
Examples
>Reading and setting the angle
js
const rotate = new CSSRotate(CSS.deg(45));
console.log(rotate.angle.value); // 45
console.log(rotate.angle.unit); // "deg"
rotate.angle = CSS.deg(90);
console.log(rotate.toString()); // "rotate(90deg)"
Specifications
| Specification |
|---|
| CSS Typed OM Level 1> # dom-cssrotate-angle> |