CSSUnitValue: CSSUnitValue() constructor - Web APIs | MDN
Syntax
js
new CSSUnitValue(value, unit)
Parameters
Examples
The following shows a method of creating a CSSPositionValue from
individual CSSUnitValue constructors.
js
let pos = new CSSPositionValue(
new CSSUnitValue(5, "px"),
new CSSUnitValue(10, "px"),
);
Specifications
| Specification |
|---|
| CSS Typed OM Level 1 # dom-cssunitvalue-cssunitvalue |