--- title: font-family slug: Web/CSS/@font-face/font-family translation_of: Web/CSS/@font-face/font-family ---
font-family属性允许我们为页面上的字体指定一个由{{cssxref("@font-face")}} 规则定义的字体族The font-family CSS descriptor allows authors to specify the font family for the font specified in an {{cssxref("@font-face")}} rule.
{{cssinfo}}
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <IDENT> value */ font-family: examplefont;
<family-name>@font-face {
font-family: examplefont;
src: url('examplefont.ttf');
}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('CSS3 Fonts', '#font-family-desc', 'font-family')}} | {{Spec2('CSS3 Fonts')}} | Initial definition |