MDN self-hosted library · e01.org

CSSRotate: angle property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

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)"