font-family
CSS descriptor allows authors to specify the font family for the font specified in an
@font-face
rule.
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont;
<family-name>
Specifies the name of the font family.
| 相关 at-rule |
@font-face
|
|---|---|
| 初始值 |
n/a (required)
|
| 计算值 | 如指定 |
<family-name>where
<family-name> = <string> | <custom-ident>+
@font-face {
font-family: examplefont;
src: url('examplefont.ttf');
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Fonts Module Level 3
The definition of 'font-family' in that specification. |
候选推荐 | 初始定义 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
font-family
|
Chrome 完整支持 4 | Edge 完整支持 12 | Firefox 完整支持 3.5 | IE 完整支持 6 | Opera 完整支持 10 | Safari 完整支持 3.1 | WebView Android 完整支持 2.2 | Chrome Android 完整支持 18 | Firefox Android 完整支持 4 | Opera Android 完整支持 10.1 | Safari iOS 完整支持 3.1 | Samsung Internet Android 完整支持 1.0 |
完整支持
font-display
font-stretch
font-style
font-weight
font-variant
font-feature-settings
font-variation-settings
src
unicode-range
font
font-family
font-feature-settings
font-kerning
font-language-override
font-optical-sizing
font-size
font-size-adjust
font-smooth
font-stretch
font-style
font-synthesis
font-variant
font-variant-alternates
font-variant-caps
font-variant-east-asian
font-variant-ligatures
font-variant-numeric
font-variant-position
font-variation-settings
font-weight
line-height
line-height-step