How to set the font to Song Dynasty in css

王林
Release: 2020-11-18 13:55:39
Original
6801 people have browsed it

How to set the font in css to Song Dynasty: You can use the font-family attribute to set it, such as [font-family: Song Dynasty;] or [font-family: SimSun;]. The font-family attribute is used to specify the font of an element.

How to set the font to Song Dynasty in css

Related attributes:

font - The family attribute specifies the font of an element.

(Learning video sharing: css video tutorial)

There are two types of font family names:

family-name - the specified family name : The name of the specific font, such as: "times", "courier", "arial".

generic-family - Common font family names: For example: "serif", "sans-serif", "cursive", "fantasy", "monospace.

Example:

<style>
.s{
    font-family: SimSun;
}
.ss{
    font-family: 宋体;
}
</style>

</head>
<body>
    <p class="s">测试宋体</p>
    <p  >测试宋体</p>
    <p class="ss">测试宋体</p>
</body>
Copy after login

Effect:

How to set the font to Song Dynasty in css

Related recommendations:CSS tutorial

The above is the detailed content of How to set the font to Song Dynasty in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!