font-family

这篇翻译不完整。请帮忙从英语翻译这篇文章

font-family属性允许我们为页面上的字体指定一个由@font-face 规则定义的字体族

The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.

Related at-rule@font-face
初始值n/a (required)
适用媒体all
计算值as specified
正规顺序the unique non-ambiguous order defined by the formal grammar

语法

/* <string> values */
font-family: "font family";
font-family: 'another font family';

/* <IDENT> value */
font-family: examplefont;

取值

<family-name>
指定字体族名称

Formal syntax

<family-name>

where
<family-name> = <string> | <custom-ident>+

示例

@font-face {
  font-family: examplefont;
  src: url('examplefont.ttf');
}

规范

Specification Status Comment
CSS Fonts Module Level 3
font-family
Candidate Recommendation Initial definition

浏览器兼容性

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support 4 12.0 3.5 (1.9.1) 6.0 9.0 3.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mini Opera Mobile Safari Mobile
Basic support 2.2 1.0 (1.9.1) 10.0 未实现 12.0 3.1

文档标签和贡献者

 此页面的贡献者: MonsterOOF
 最后编辑者: MonsterOOF,