CSS @font-feature-values
原创@font-feature-values
Baseline
2023
Newly available
Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
概要
@font-feature-values CSS at 规则允许作者在font-variant-alternates 中使用通用名称,用于在 OpenType 中以不同方式激活功能。它允许在使用几种字体时简化 CSS。
css
@font-feature-values Font One {
/* How to activate nice-style in Font One */
@styleset {
nice-style: 12;
}
}
@font-feature-values Font Two {
/* How to activate nice-style in Font Two */
@styleset {
nice-style: 4;
}
}
/* … */
.nice-look {
font-variant-alternates: styleset(nice-style);
} /* Independent of the font */
The @font-feature-values at-rule may be used at the top level of a CSS, but also inside any CSS conditional-group at-rule.
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权本站发表,未经许可,不得转载。
上一篇:CSS
@font-face 下一篇:CSS
字体调色板值
开发学习网




