HTML and CSS Reference
In-Depth Information
Time
Time units are used only with CSS3 properties. There are just two units, as shown in Table
3-4
.
Table 3-4.
Time Units in CSS3
Unit
Meaning
s
Seconds
ms
Milliseconds (1/1,000 of a second)
Again, there must be no space between the number and the unit.
■
When specifying a zero value for an angle or time, you must include the unit of measurement, for
example,
0deg
,
0s
. The only time you can omit the unit after zero is with lengths and percentages.
Caution
Setting Color Values
CSS offers the following options for setting color values:
•
Color keywords
•
Hexadecimal notation
•
RGB (red, green, blue) format
•
HSL (hue, saturation, lightness) format (CSS3)
•
RGBA (red, green, blue with alpha transparency) format (CSS3)
•
HSLA (hue, saturation, lightness with alpha transparency) format (CSS3)
Color Keywords
CSS3 defines the 16 basic color keywords shown in Figure
3-3
. The names are case-insensitive.