Are there any practical reasons to use “em” instead of “pt” font size units?

后端 未结 7 1482
南笙
南笙 2020-12-08 11:19

One CSS rule I have learned is that you should use the relative \"em\" font-size unit instead of the absolute \"pt\". The general idea is to set the font-size in your body t

相关标签:
7条回答
  • 2020-12-08 12:17

    From my experience as a web user who likes big text:

    Specifying "pt" for font sizes is fine, as long as you don't specify element sizes in px/pt. Because when you do, and I increase the text size, half the text overflows ouside the element and way too often overflow is set to hidden.

    This doesn't need to distort your layout -- just leave room for everything to grow downward. I can handle scrolling the page better than I can not seeing the text.

    0 讨论(0)
提交回复
热议问题