How to set font style by CSS
This article mainly introduces "CSS how to set font style" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "CSS how to set font style" article can help you solve the problem.
First, the font tag sets the font. I am set to Microsoft Yahei
The font tag sets the face font attribute and its value can set different fonts.
II. Css sets font style
Css font style word is font-family
. {font-family: "Microsoft Acer"}
The font is set to Microsoft yahei for the style selector
Third, commonly used Chinese fonts
Commonly used Chinese fonts:
1. Blackbody
2. Song style
3. Microsoft Yahei
Please do not add your own computer installation fonts, otherwise the font style will become invalid because the client computer does not install your font settings.
4. Chinese characters in Chinese fonts need to be transferred to unicode coding
In order to avoid the compatibility of Chinese characters directly set by browsers such as IE9, ie9 Chinese character fonts cause line-height invalidation. It is recommended to convert the Chinese characters with set fonts to unicde. The same font effect will not be affected after transcoding, and will be compatible with the problem that some browsers do not support Chinese characters.
Convert unicode to\ 9ED1\ 4F53 in boldface
The Song style changes unicode to\ 5B8B\ 4F53.
Microsoft Yahi changed unicode to\ 5FAE\ 8F6F\ 96C5\ 9ED
This is the end of the introduction to "how to style fonts in CSS". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.