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. A <number>
can also end with the letter e
or E
followed by an integer, which indicates a base-ten exponent in scientific notation. There is no unit associated with numbers.
As with integers, the first character of the number can be immediately preceded by - or + to indicate the number's sign: whether the number is positive or negative.
InterpolationWhen animated, values of the <number>
CSS data type are interpolated as real, floating-point numbers. The speed of the interpolation is determined by the easing function associated with the animation.
12 A raw <integer> is also a <number>. 4.01 Positive fraction -456.8 Negative fraction 0.0 Zero +0.0 Zero, with a leading + -0.0 Zero, with a leading - .60 Fractional number without a leading zero 10e3 Scientific notation -3.4e-2 Complicated scientific notationInvalid numbers
12. Decimal points must be followed by at least one digit. +-12.2 Only one leading +/- is allowed. 12.1.1 Only one decimal point is allowed.Specifications Browser compatibility
Loadingâ¦
See also<integer>
<ratio>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5