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

前端 未结 8 702
梦如初夏
梦如初夏 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:37

    Already been answered, but I thought I might add that the formula is usually is:

    The difference between line-height and font-size is called Leading. Then divide this Leading by 2 to get half-leading, which is put above and below your text causing it to be vertically centered.

    The following set of slides will explain a lot about line-height. You can start at slide 72 for what I explained above, but I would recommend going through the whole set.

提交回复
热议问题