font-family - CSS: Cascading Style Sheets 编辑
The font-family
CSS descriptor allows authors to specify the font family for the font specified in an @font-face
rule.
Syntax
/* <string> values */
font-family: "font family";
font-family: 'another font family';
/* <custom-ident> value */
font-family: examplefont;
Values
<family-name>
- Specifies the name of the font family.
Formal definition
Related at-rule | @font-face |
---|---|
Initial value | n/a (required) |
Computed value | as specified |
Formal syntax
<family-name>where
<family-name> = <string> | <custom-ident>+
Examples
Setting the font family name
@font-face {
font-family: examplefont;
src: url('examplefont.ttf');
}
Specifications
Specification | Status | Comment |
---|---|---|
CSS Fonts Module Level 3 The definition of 'font-family' in that specification. | Recommendation | Initial definition |
Browser compatibility
BCD tables only load in the browser
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论