Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. CSSNumericValue

CSSNumericValue

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

TheCSSNumericValue interface of theCSS Typed Object Model API represents operations that all numeric values can perform.

CSSStyleValue CSSNumericValue

Interfaces based on CSSNumericValue

Below is a list of interfaces based on the CSSNumericValue interface.

Instance properties

None.

Static methods

CSSNumericValue.parse

Allows aCSSNumericValue to be constructed directly from a string containing CSS.

Instance methods

CSSNumericValue.add

Adds a supplied number to theCSSNumericValue.

CSSNumericValue.sub

Subtracts a supplied number from theCSSNumericValue.

CSSNumericValue.mul

Multiplies theCSSNumericValue by the supplied value.

CSSNumericValue.div

Divides theCSSNumericValue by the supplied value.

CSSNumericValue.min

Returns the minimum value passed

CSSNumericValue.max

Returns the maximum value passed

CSSNumericValue.equals

True if all the values are the exact same type and value, in the same order. Otherwise,false.

CSSNumericValue.to

Convertsvalue into another one with the specifiedunit.

CSSNumericValue.toSum

Converts an existingCSSNumericValue into aCSSMathSum object with values of a specified unit.

CSSNumericValue.type

Returns the type ofCSSNumericValue, one ofangle,flex,frequency,length,resolution,percent,percentHint, ortime.

Specifications

Specification
CSS Typed OM Level 1
# numeric-value

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp