Get the App
SLTechnology News&Howtos  ›  Development  › 

How to correctly set Chinese fonts for compatible browsers by css

Shulou Source: shulou.com Published: 2022-06-01 06:51:11 10月03日 Update

This article will explain in detail how to correctly set Chinese fonts for compatible browsers in css. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

High-version IE readers (such as IE9) and some operating systems set up CSS equipment to set fonts for direct application of Chinese characters, for example, direct css configuration fonts for Chinese calligraphy "Song style", "boldface", "Microsoft Yahei" and other Chinese calligraphy, poor line-height compatibility will work.

Css line-height line height failure

Operate the pen and ink in the font-family setting, instead of Chinese calligraphy, convert Chinese characters to Unicode coding or Chinese corresponding to English.

The following is the correspondence of text fonts in css settings:

Font-English-Unicode

Boldface-SimHei -\ 9ED1\ 4F53

Arial-- SimSun--\ 5B8B\ 4F53

Microsoft Yahei-Microsoft YaHei -\ 5FAE\ 8F6F\ 96C5\ 9ED1

Italics-KaiTi -\ 6977\ 4F53

New Song style-- NSimSun--\ 65B0\ 5B8B\ 4F53

Small sample CSS code:

1. Div {font-family: "bold"}

2. Div {font-family: "SimHei"}

3. Div {font-family: "\ 9ED1\ 4F53"}

The above use font-family to set the font to boldface, 1, 2, 3 are set equipment boldface only application value difference, usually recommend the second and third values to set the pen and ink in the equipment.

This is the end of the article on "how to correctly set Chinese fonts for compatible browsers in css". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Font boldface decoration Chinese Song style text article calligraphy Chinese font browser browsing more pen and ink Microsoft English application good practical operating system bad Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi NVidia Shulou Technology Shulou Information OPPO Reno