const transform = new CSSTransformValue([
new CSSTranslate(CSS.px(10), CSS.px(20)),
new CSSScale(2, 3),
]);
console.log(transform.length); // 2
console.log(transform.toString()); // "translate(10px, 20px) scale(2, 3)"CSSTransformValue: CSSTransformValue() constructor
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
try {
const transform = new CSSTransformValue([]);
} catch (e) {
console.log(e); // TypeError
}