1. Size
Unit |
Description |
% |
Percentage |
Inch |
Inches |
Cm |
Cm |
Mm |
Mm |
Em |
1em equals the current font size. 2em equals twice times the current font size. For example, if an element is displayed in 12pt, then 2EM is 24pt. in CSS, EM is a very useful unit because it automatically adapts to the font that the user uses . |
Ex |
An ex is a font of x-height. (X-height is usually half the size of the font.) ) |
Pt |
LBS (1 pt equals 1/72 inches) |
Pc |
12-point movable (1 pc equals 12 points) |
Px |
Pixel (a point on the computer screen) |
Color
Unit |
Description |
(color name) |
Color name (e.g. red) |
RGB (X,X,X) |
RGB values (such as RGB (255,0,0)) |
RGB (x, x, x) |
RGB percent value (such as RGB (100%,0%,0%)) |
#rrggbb |
hexadecimal number (e.g. #ff0000) |
2.
1, HTTP://WWW.W3SCHOOL.COM.CN/CSSREF/CSS_UNITS.ASP2,
|
Ylbtech Source: http://ylbtech.cnblogs.com/ This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility. |
CSS:CSS units