Nested inside a

tag giving different font size

后端 未结 2 426
伪装坚强ぢ
伪装坚强ぢ 2021-01-20 17:59

Applying an enlarged font-size using em directly to a

tag and to the nested tag are giving different results.

2条回答
  •  执念已碎
    2021-01-20 18:10

    "The em unit is a relative unit based on the computed value of the font size of the parent element. This means that child elements are always dependent on their parent to set their font-size."

    Reference: CSS-Tricks

    Your

    tag has already 1,4 of normal size and is 1,7 of its parent (which is already enlarged).

提交回复
热议问题