data-type

<number> — CSS reference

A unitless numeric value can include fractional digits, a sign or exponent notation. The receiving grammar defines whether negatives and fractional values are allowed. A number is not automatically a length; unitless zero is specially allowed in many length contexts.

Formal Syntax & Structure

css syntaxcss
<number>   /* e.g. 0.25, -2, 1e2 */

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a {opacity:2.5e-1} #b {opacity:.75}</style><body><div id="parent"><div id="a">Sample</div><div id="b">Comparison</div></div></body></html>
CSS Reference