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

后端 未结 7 1523
南笙
南笙 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:10

    1) IE6 is still widely used and is unable to resize the fonts defined in px. => Usability issues. That alone is a no-no.

    2) See CSS Units for example.

    3) Most authors agree to say that pt is mostly a print unit: at worst, use them in print stylesheets, where the resize problem disappears...

提交回复
热议问题