CSSRotate: angle property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used 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> |