font-size:large对1em的字体有什么影响?

我正在使用CSS属性ѭ0更新一个包含很多部分的网站。 我想替换它,以便它使用EM代替,因为它更明确的大小。 如果
font-size:larger
应用于1em字体,新字体有多少EM?像1.2em这样的东西?     
已邀请:
如W3C CSS2 Fonts文档中所述:
<relative-size>
A <relative-size> keyword is interpreted relative to the table of font sizes
and the font size of the parent element. Possible values are: [ larger | smaller ].
For example, if the parent element has a font size of 'medium', a value of 'larger'
will make the font size of the current element be 'large'. If the parent element's
size is not close to a table entry, the UA is free to interpolate between table
entries or round off to the closest one. The UA may have to extrapolate table values
if the numerical value goes beyond the keywords.
在这之下,说:
Note 2. In CSS1, the suggested scaling factor between adjacent indexes was 1.5, which
user experience proved to be too large. In CSS2, the suggested scaling factor for a
computer screen between adjacent indexes was 1.2, which still created issues for the
small sizes. Implementation experience has demonstrated that a fixed ratio between
adjacent absolute-size keywords is problematic, and this specification does not
recommend such a fixed ratio.
我希望这回答了你的问题。     
根据SitePoint参考,您的猜测是完全正确的。大多数浏览器会将字体大小增加
1.2em
倍,但没有标准可以这样做。 W3C建议您使用
em
或%进行大小调整,因为页面上元素的大小将相互关联,而不依赖于某些不太常用的浏览器中可能不会使用的任意约定。     
font-size:larger
将导致所选元素的字体大小大于其父容器的字体大小。 CSS的标准字体大小是中等的。实际的
px
em
值取决于客户端/浏览器。通常它是1em,常见的转换是1em = 16px。     

要回复问题请先登录注册