line-gap-override
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
@font-face
at-规则的 line-gap-override
CSS 描述符用于定义字体的行间距(line-gap)度量值。行间距度量值是字体推荐的行间距,或称为外部行距(external leading)。
语法
css
line-gap-override: normal;
line-gap-override: 90%;
值
normal
-
默认值。使用该值时,度量值将从字体文件中获取。
<percentage>
-
<percentage>
值。
形式定义
Related at-rule | @font-face |
---|---|
初始值 | normal |
Percentages | as specified |
计算值 | as specified |
形式语法
line-gap-override =
normal |
<percentage [0,∞]>
示例
>覆盖后备字体的度量值
line-gap-override
属性在覆盖后备字体的度量值时非常有用,可以让其更好地匹配主要 web 字体的度量值。
css
@font-face {
font-family: web-font;
src: url("https://example.com/font.woff");
}
@font-face {
font-family: local-font;
src: local("Local Font");
line-gap-override: 125%;
}
规范
Specification |
---|
CSS Fonts Module Level 4> # font-metrics-override-desc> |
浏览器兼容性
Loading…