The <number>
CSS data type represents a number, being either an integer or a number with a fractional component.
The <number>
CSS data type represents a number, being either an integer or a number with a fractional component.
The syntax of <number>
extends the syntax of <integer>
. A fractional value is represented by a .
followed by one or more decimal digits, and may be appended to an integer. There is no unit associated with numbers.
When animated, values of the <number>
CSS data type are interpolated as real, floating-point numbers. The speed of the interpolation is determined by the timing function associated with the animation.
Specification |
---|
CSS Values and Units Module Level 4 # numbers |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
number |
1 | 12 | 1 | 5 | 2 | 1 | 4.4 | 18 | 4 | 10.1 | 1 | 1.0 |
scientific_notation |
43 | 12 | 29 | 11 | 30 | 10.1 | 43 | 43 | 29 | 30 | 10.3 | 4.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/number