CSSFontFaceDescriptors
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Giao diện CSSFontFaceDescriptors đại diện cho khối khai báo CSS cho at-rule @font-face.
Mỗi descriptor trong phần thân của at-rule @font-face tương ứng có thể được truy cập bằng tên thuộc tính kebab-case của nó trong ký hiệu dấu ngoặc vuông hoặc phiên bản camelCase của tên thuộc tính trong ký hiệu dấu chấm. Ví dụ, bạn có thể truy cập CSS descriptor font-family như style["font-family"] hoặc style.fontFamily, trong đó style là instance CSSFontFaceDescriptors.
Note:
Giao diện CSSFontFaceRule đại diện cho at-rule @font-face, và thuộc tính CSSFontFaceRule.style là instance của đối tượng này.
Thuộc tính phiên bản
Kế thừa các thuộc tính từ tổ tiên CSSStyleDeclaration.
Các tên thuộc tính sau, trong định dạng kebab-case và camelCase, mỗi cái đại diện cho giá trị của descriptor trong at-rule @font-face tương ứng:
font-displayhoặcfontDisplayExperimental : Chuỗi đại diện cho giá trị của descriptorfont-display.font-familyhoặcfontFamilyExperimental : Chuỗi đại diện cho giá trị của descriptorfont-family.font-feature-settingshoặcfontFeatureSettingsExperimental : Chuỗi đại diện cho giá trị của descriptorfont-feature-settings.font-stretchhoặcfontStretchExperimental : Chuỗi đại diện cho giá trị của descriptorfont-stretch.font-stylehoặcfontStyleExperimental : Chuỗi đại diện cho giá trị của descriptorfont-style.font-weighthoặcfontWeightExperimental : Chuỗi đại diện cho giá trị của descriptorfont-weight.font-widthhoặcfontWidthExperimental : Chuỗi đại diện cho giá trị của descriptorfont-width.size-adjusthoặcsizeAdjustExperimental : Chuỗi đại diện cho giá trị của descriptorsize-adjust.srcExperimental : Chuỗi đại diện cho giá trị của descriptorsrc.unicode-rangehoặcunicodeRangeExperimental : Chuỗi đại diện cho giá trị của descriptorunicode-range.
Phương thức phiên bản
Không có phương thức cụ thể; kế thừa các phương thức từ tổ tiên CSSStyleDeclaration.
Thông số kỹ thuật
| Specification |
|---|
| CSS Fonts Module Level 4> # om-fontface> |