Problem description

For development projects, use native fonts such as Microsoft yahei or 宋体 (宋体 is ugly and not recommended). You can also download the font to use. This article documents how to modify fonts in your project.

Steps describe

Reset.css (reset.css) is used to change the development style of the project uniformly in different companies’ projects. We changed the font of the project, that is, in reset.css.

Step 1: Download the font and save it to the project

There are many free font download sites on the Internet, here to provide a free font download site, good. Portal attached: www.ypppt.com/ziti/

Once the font is downloaded, we can put the font next to the reset style sheet for easy import. The diagram below:

Step two, introduce fonts

We use the @font-face property of CSS to introduce fonts, which can be introduced in the reset style sheet. As shown below:

@font-face CSS can specify a custom font for displaying text. Fonts can be loaded from a remote server or from an existing font installed locally by the user

Step 3: Use the imported font

You can use it directly in body, as shown below:

Finally, take a look at the image

The font style diagram is not modified

Modified font style diagram

conclusion

A good memory is better than a bad pen. Write it down