1, font-family
Function: Used to change the font of HTML flags or elements, you can set a list of available fonts. The browser selects the font from front to back.
Syntax: {font-family: Font 1, Font 2, ..., Font n}
Example:
Font
2, Font-style
Function: Make text appear as flat italic or italic, etc. to emphasize.
Numerical:
Normal-OK
Italic-Italic
Oblique-skewed body
Example:
Normal
Italic
Oblique
3, Font-variant
Function: Used to switch between normal and small caps font.
Value: Normal-If the flag inherits the Small-caps setting of the parent element, the keyword normal font-variant is set to the normal font.
Small-caps-lowercase letters are displayed as uppercase letters with smaller font sizes.
Example:
Font-variant
4, Font-weight
Features: Used to set the font grayscale, to generate a deep, shallow version of the font.
Numerical:
Normal grayscale--normal
Relative grayscale-Bold, bolder, light, lighter
Gradient grayscale-values are as follows: 100, 200, 300, 400 (equivalent to normal), 500, 600, 700 (equivalent to bold), 800, 900.
Example:
Font grayscale
5, Font-size
Function: Controls the font size of text in various units of measure.
Value: There are four numerical methods
Absolute size-Define the font size with a specific size table, and you can take one of the following values: Xx-small, X-small, small, medium, large, X-large, Xx-large. Different fonts have different values.
Relative size-larger, smaller, the resulting dimensions are relative to the size of the parent container.
Length-in millimeters (mm), centimeters (cm), inches (in), Points (PT), pixels (px), Pica (PC), ex (height of lowercase letter x) or em (font height) as unit of measure.
Percent-the percentage of the font size relative to its parent element.
Example: Font size
6. Font
Features: Shorthand property, which provides a quick way to set all properties of a font.
Syntax: {font: Font property 1 Font Properties 2 ... Font attribute N}
Value: The Font property value is the previously listed value, in addition to the Line Spacing property line-height (see Text properties), the Order of contents is: Font-style; Font-variant; Font-weight; Font-size; Line-height; Font-family. Partial attributes can be omitted, separated by spaces between attribute values.
Example:
FONT
The above is the CSS Grammar Manual (a) the contents of the font attributes, more relevant content please follow topic.alibabacloud.com (www.php.cn)