Get the App
SLTechnology News&Howtos  ›  Development  › 

How to correctly set the Chinese font of compatible browsers in html

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

This article mainly introduces how to correctly set the Chinese font of compatible browsers in html, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

High-version IE browsers (such as IE9) and some monopoly trivialities are not compatible with CSS fonts for direct use. For example, if you directly set the font to Chinese calligraphy "Song style", "boldface", "Microsoft Yahei" and so on, line-height compatibility will be effective.

Through the font-family configuration of Chinese fonts, without the Chinese calligraphy door size, the Chinese pen and ink will be converted to Unicode coding or Chinese corresponding to English.

The following is the correspondence of pen and ink fonts in common 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"}

Thank you for reading this article carefully. I hope the article "how to correctly set Chinese fonts compatible with browsers in html" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Font Chinese pen and ink article Chinese font browser browsing boldface boldface calligraphy Microsoft English configuration triviality bad code value interest at the same time common Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info MariaDB Apple Docker