web api instance method
CSSNumericValue: div() method
The div() method of the
CSSNumericValue interface divides the CSSNumericValue by the
supplied value.
Syntax
div(number)
Parameters
number- : Either a number or a
CSSNumericValue.
- : Either a number or a
Return value
Exceptions
TypeError- : Thrown if an invalid type was passed to the method.
Examples
let mathProduct = CSS.px("24").div(CSS.percent("4"));
// Prints "calc(24px / 4%)"
mathProduct.toString();
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.