Why em instead of px?

后端 未结 15 1048
闹比i
闹比i 2020-11-22 06:38

I heard you should define sizes and distances in your stylesheet with em instead of in pixels. So the question is why should I use em instead of px when defining styles in c

15条回答
  •  [愿得一人]
    2020-11-22 07:18

    You probably want to use em for font sizes until IE6 is gone (from your site). Px will be alright when page zooming (as opposed to text zooming) becomes the standard behaviour.

    Traingamer already provided the neccessary links.

提交回复
热议问题