How to change css font to Chinese regular script

醉折花枝作酒筹
Release: 2023-01-05 16:08:34
Original
6802 people have browsed it

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:华文行楷;
 }
Copy after login

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

##Some of Windows:

  • 黑体:SimHei

  • 宋体:SimSun

  • 新宋体:NSimSun

  • imitating Song Dynasty: FangSong

  • Kaiti: KaiTi

  • FangSong_GB2312: FangSong_GB2312

  • Kaiti_GB2312: KaiTi_GB2312

  • Microsoft YaHei: Microsoft YaHei

Some of the things that will come out of installing Office:

  • official script :LiSu

  • 小元:YouYuan

  • 中文字幕黑:STXihei

  • 中文字幕: STKaiti

  • Chinese Song Dynasty: STSong

  • Chinese Song Dynasty: STZhongsong

  • Chinese Song Dynasty: STFangsong

  • Founder ShuTi: FZShuTi

  • Founder Yaoti: FZYaoti

  • 华文彩云: STCaiyun

  • Chinese Amber: STHupo

  • Chinese Official Script: STLiti

  • Chinese Regular Script: STXingkai

  • 华文新伟:STXinwei

Note: If the name of the font is one word, there is no need to add quotation marks, otherwise it will be in ie6 and 7 Invalid, and subsequent styles will not take effect!

Recommended learning:

css video tutorial

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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template