草案
此页面不完整。
这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
FontFace.family
property allows the author to get or set the font family of a
FontFace
object. This is equivalent to the
font-family
descriptor of
@font-face
.
instanceOfFontFace.family = 'font family name'; var fontFace = instanceOfFontFace.family; // "font family name"
A
DOMString
.
var fontFace = new FontFace('Roboto', 'url(https://fonts.example.com/roboto.woff2)');
console.log(fontFace.family); // 'Roboto'
fontFace.family = 'newRoboto';
console.log(fontFace.family); // 'newRoboto'
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Font Loading Module Level 3
The definition of 'family' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
系列
|
Chrome 35 | Edge 79 | Firefox Yes | IE ? | Opera Yes | Safari 10 | WebView Android 37 | Chrome Android 35 | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android 4.0 |
完整支持
兼容性未知
实验。期望将来行为有所改变。
FontFace