Home > Web Front-end > Front-end Q&A > What to do if css font is garbled

What to do if css font is garbled

藏色散人
Release: 2023-01-05 16:11:19
Original
4650 people have browsed it

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!

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