Are there any rules for font-size and line-height rendering within the browser?

<div style="line-height:200px; border:1px solid -sharp34538b;">
    <span style="font-size:60px; border:1px solid -sharpa0b3d6;"></span>X
</div>

clipboard.png

Why is the height of div not 200? if you set a section of font-size, such as 53Power54 and 55px, the height of div will not change in chrome,opera, but firefox will add up to 0.25. do font-size and line-height have corresponding rules inside the browser?

Mar.01,2021

CSS2

is that line-height is an inheritable attribute, so after the outer div sets the row height, the inside span inherits the row height, causing the height of the div to be enlarged. Reset the row height of the span, such as 60, to see the effect.


the size of the line where the font is located is affected not only by font-size,line-height, but also by the font itself.
specifically you can , although I have seen it, but I have forgotten what I said.


you need to know about line-height
http://www.cnblogs.com/fengzh.

.
Menu