CSS | Number Data Type
CSS Value is represented by <number> which takes an integer as a parameter or a number with a fractional component. They can be used by the symbol (+) or (-). The number can be positive or negative. All the digits of the number are 0 to 9 and all are of numeric types.
Note: No unit associated with numbers.
Examples for valid numbers
23, +90, -76, 0.56, 34.67, 10e4, -4.6e-2
Examples for invalid numbers
23., -+45, 45.7.6
Example 1: The following example demonstrates applying opacity to any element.
Example 2: The following example shows the opacity property with some changed value.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.