Документация
HTML CSS PHP PERL другое
Appendix: Value Types
 
Table of Contents
Previous Next

Appendix: Value Types

Note 

 Not all value types are represented here, only the ones used in this book. There are additional types available for aural style sheets and counters. You can find information on these value types at www.w3.org/TR/REC-CSS2/syndata.html#values.

Value Types

Value Type

Available Values

Example(s)

Notes

Integers and Real Numbers

0-9

line-height: 1.3;

Lengths:
Relative Units

Height of M (em)
Height of X (ex)
Pixels (px)

0.95em
1.0ex
14px

Relative unit lengths are scaled according to the size of the parent element.

Lengths:
Absolute Units

Inches (in)
Centimeters (cm)
Millimeters (mm)
Points (pt)
Picas (pc)

1in
2cm
2mm
12pt
12pc

Absolute length units do not scale.

Lengths:
Keywords

xx-small, x-small, small, smaller, medium, large, larger, x-large, xx-large

font-size: large

Keyword measurements do not necessarily scale. These keywords apply only to font-size.

Percentages

%

width: 100%

 

URL + URN =

URI url()

url(/images/012/logo.gif)

Colors:
Keywords

color: orange;

Most named colors are not part of the web-safe palette.

Colors:
Hexadecimal

#hexvalue

color: #FFFFFF

 

Colors:
Hexadecimal Shorthand

#hexvalue

color: #FFF

Only available for paired values. All web-safe colors can be written in shorthand.

Colors:
RGB

#hexvalue

color: (255, 255, 255)

 

Colors:
RGB

%

color: (80%, 30%, 20%)

 
Table of Contents
Previous Next


 Приглашаем посетить сайты 
Мода Чехов Крылов Автомобили Шмелев Сологуб Успенский Жуковский Футбол CSS