Home >Web Front-end >CSS Tutorial >How to change css font to Chinese regular script
In CSS, you can use the font-family attribute to set the font to Chinese Xingkai, the syntax is "font-family: Chinese Xingkai|STXingkai". The value of the font-family attribute is a prioritized list of font family names or class family names to use for an element; the browser uses the first value it recognizes.
The operating environment of this tutorial: Windows7 system, CSS3&&HTML5 version, Dell G3 computer.
.selector{ font-family:华文行楷; }
How to set various Chinese fonts in css such as Yahei, Hei, Song, Kai, etc.
Instructions:
Add the Chinese name" Microsoft Yahei" is for compatibility with opera.
MicrosoftJhengHei is Microsoft's regular boldface, STHeiti is Chinese boldface, MingLiu remembers that Chinese under 11px has extraordinary effects.
It is recommended to use the English representation of Chinese fonts in CSS. The English names of common Chinese fonts are attached below:
Some of Mac OS:
Chinese fine black: STHeiti Light [STXihei]
Chinese bold: STHeiti
Chinese regular script: STKaiti
Chinese Song Dynasty: STSong
Chinese Song Dynasty: STFangsong
The above is the detailed content of How to change css font to Chinese regular script. For more information, please follow other related articles on the PHP Chinese website!