Home > Web Front-end > HTML Tutorial > Full analysis of web page element units_HTML/Xhtml_Web page production

Full analysis of web page element units_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:44:06
Original
1495 people have browsed it

Relative Length Units
em
Description: Relative length units. The font size relative to the text within the current object.
If the font size of the current inline text has not been manually set, it will be relative to the browser's default font size.
Example:
div { font-size : 1.2em; }
ex
Description: Relative length unit. Height relative to character "x". This height is usually half the font size.
If the current font size for inline text has not been manually set, it will be relative to the browser's default font size.
Example:
div { font-size : 1.2ex; }
px
Description: Relative length unit. Pixel.
Pixels are relative to the monitor screen resolution. For example, the resolution used by WONDOWS users is generally 96 pixels/inch. The resolution used by MAC users is generally 72 pixels/inch.
Example:
div { font-size : 12px; }

-------------------------- -------------------------------------------------- ---
Absolute Length Units
pt
Description:
Absolute length unit. Point.
1in = 2.54cm = 25.4 mm = 72pt = 6pc
Example:
div { font-size : 9pt; }
pc
Description:
Absolute length unit. Pica. It is equivalent to the size of my country's new No. 4 type.
1in = 2.54cm = 25.4 mm = 72pt = 6pc
Example:
div { font-size : 0.75pc; }
in
Description:
Absolute length unit. Inch.
1in = 2.54cm = 25.4 mm = 72pt = 6pc
Example:
div { font-size : 0.13in; }
cm
Description:
Absolute length unit. Centimeter.
1in = 2.54cm = 25.4 mm = 72pt = 6pc
Example:
div { font-size : 0.33cm; }
mm
Description:
Absolute length unit. Millimeter.
1in = 2.54cm = 25.4 mm = 72pt = 6pc
Example:
div { font-size : 3.3mm; }

------------ -------------------------------------------------- ------------------
Color Units Reference
#RRGGBB
Parameters:
RR :

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template