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.
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>
Effect:
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!