font-family version: CSS1 compatibility: ie4+ ns4+ Inheritance: Available
Grammar:
Font-family:name font-family:cursive | Fantasy | monospace | Serif | Sans-serif
Parameters:
Name: Font names. Ranked in order of precedence. separated by commas. If the font name contains spaces, enclose it in quotation marks
The second way of declaring is to use the list of font sequence names. If you use the fantasy sequence, the default font sequence is provided
Description
Sets or retrieves a sequence of font names used for text in an object.
The default value is determined by the browser.
The sequence can contain embedded font fonts. See @font-face rules.
The corresponding script attribute is fontfamily. Please refer to the other bibliography I have written.
Example:
div.fixedwidth {font-family:courier, "Courier New", monospace}
Why is the font-family set in CSS: "Microsoft Black" is useless?
Recommended use of font-family: "Microsoft Yahei";
Supports the UTF-8 and GB2312 character sets.
3 cases not in force:
1. When this attribute defines a global style, the label for the form class does not take effect and needs to be defined again as:
Body {font-family: "Microsoft Yahei";} The form input does not take effect,
You also need to define an input {font-family: "Microsoft Yahei";} Can.
2. The local computer does not exist Microsoft Ya Black font, some system default does not have Microsoft ya Black, the general default is the song body, as long as the download a Microsoft Ya black font, after installation can.
3. There is also a character set problem, it is suggested that the Chinese font-family: "Microsoft Jas Black"; font-family: "Microsoft Yahei"; The character set affirms UTF-8 or GB2312.