How to set the default font for a Web page

Source: Internet
Author: User

body{font-family: "Hiragino Sans GB", "Hiragino Sans GB W3", "Helvetica Neue", "Microsoft Yahei", Helvetica,arial, Sans-serif}

Or

Body

{

font-family: "Microsoft Yahei", Arial,helvetica,sans-serif, "Song Body";

}

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.

How to set the default font for a Web page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.