Change text through font, mainly from the following aspects
- Font bold, font style: Italic and Font variants: small caps
- Size of font
- Row height
- Font
Examples such as the following
P{font:italic 75%/125% "Comic Sans MS", cursive;}
This rule defines several attributes of the font so that the entire paragraph text becomes italic.
The font size is set to 3/4 of the font size of the parent element for each paragraph, and the row height is set to 125% (slightly larger than the regular interval).
The text font is set to Comic Sans MS, and the default font is used if the font is not supported by the browser: cursive.
This rule also removes the effects of bold and small-caps (set their values to normal)
Fonts: Precautions font-family
1 because the user can not be expected to access the font defined in the style table. So it's a good idea to have an alternate font list after the property when setting the font.
2 at the end of this font list, add one of the system fonts. such as: Serif,sans-serif,cursive,fantasy or monospace
If fonts do not support the font characteristics set in the style table, the browser uses a different font.
Font Size: font-size
Row Height Line-height
The row height is used to specify the distance between rows and rows (line spacing).
Decorative Text-decoration
Specify text style underline double underline line-through underline none cancel
Font-style specifying text styles Normal, italic, oblique, inherit
FONT-WEIGHT Specifies whether the text is bold
Default value: Normal
Applies to: all elements
Inheritance: Support
Desirable value: normal | Bold | Bolder | lighter| |200 |300|400|500|600|700|800|900|inherit
CSS---------------Text Types