CSS - Line height property, how it works (simple)

前端 未结 8 699
梦如初夏
梦如初夏 2020-12-11 16:49

So in this simple example I have as final result:

\"alt

This is a very simple question but I sim

8条回答
  •  失恋的感觉
    2020-12-11 17:35

    Essentially the line-height helps to set the "leading" and "half-leading". The 100px accounts for the total height of the element and the text is being "vertically aligned" within that area. Half is going above and half below.

    This explains better than I. http://www.w3.org/TR/CSS2/visudet.html#line-height

提交回复
热议问题