Home  >  Article  >  Web Front-end  >  What to do if css font is garbled

What to do if css font is garbled

藏色散人
藏色散人Original
2021-04-26 09:27:074644browse

Solutions to garbled css fonts: 1. Unify css coding and html page coding; 2. Write Chinese fonts in English, such as "font-family:"simsun";".

What to do if css font is garbled

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Css Chinese font garbled solution:

Unify css encoding and html page encoding. If the html page is utf-8, css, and js are also unified into utf-8 encoding. If the html page is gb2312, css, and js are also unified into gb2312 encoding.

Another way to avoid Chinese garbled characters is to write Chinese fonts in English, for example: font-family: "宋体"; font-family: "Microsoft Yahei"; corresponding to: font-family:" simsun";font-family:"Microsoft YaHei";

[Recommended learning: css video tutorial]

The above is the detailed content of What to do if css font is garbled. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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