[英]Is it safe to use inherit in css font-family
I want to use a special font for some HTML element text. 我想对某些HTML元素文本使用特殊字体。 But I want to set parent font style when failed rendering special font on browser.
但是我想在浏览器上渲染特殊字体失败时设置父字体样式。
Example CSS code: CSS代码示例:
.SmoothText {
font-family: "Special Font name", inherit;
}
Is it safe or not to mix font name and inherit
? 混合使用字体名称和
inherit
是否安全?
inherit
can only exist by itself as a value for any property. inherit
只能作为任何属性的值单独存在。 What you have is invalid. 您所拥有的是无效的。
If you want to add a font family to a parent font stack, you will need to specify the parent font stack again. 如果要将字体系列添加到父字体堆栈,则需要再次指定父字体堆栈。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.