问题描述
我有一个CSS声明如下:
I have a CSS declaration like this:
font-family: font1, font2, font3;
,其中font1是嵌入式EOT / TTF字体,但问题是,这种字体是比小其他字体,所以我想有一个不同的字体大小(1.8em)这种字体(font1)。所有其他字体(font2,font3)保持不变。
where font1 is an embedded eot/ttf font, but the problem is that this font is smaller than the other fonts so I want to have a different font-size (1.8em) for this font (font1). All other fonts (font2, font3) stay untouched.
现在的问题是,如果用户的浏览器使用font1,font2或font3我无法验证。是否有任何CSS声明,允许不同的字体,大小不同的家庭?
The problem is, that I cannot verify if the user's browser uses font1, font2 or font3. Is there any css declaration which allows different font-sizes for different families?
感谢。
推荐答案
是可以做到这一点,但它是现在非常支持。您正在寻找的CSS属性是 font-size-adjust
- 一个新的CSS3属性,专门解决这个问题。规范说:
There is a way to do this, but it's as of now very badly supported. The CSS property you are looking for is font-size-adjust
- a new CSS3 property introduced specifically to address this problem. The specification says:
但是,它只支持在Firefox的现在,所以你可能想寻找替代品。
However, it is only supported in Firefox as of now, so you might want to look for alternatives.
有关如何使用它的示例,请参阅:
For examples of how to use it, see:
这篇关于css不同的字体大小不同的家庭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!