Em vs Px and cross browser compatibility

后端 未结 4 1940
北海茫月
北海茫月 2021-02-07 19:07

I\'m a CSS newbie and was wondering if there is a benefit using em instead of px when it comes the cross browser compatibility of my CSS.

4条回答
  •  不思量自难忘°
    2021-02-07 20:03

    EM can be resized in some older browsers (IE 6 included) while PX do not. But frankly people that have accessibility needs to be able to resize font size are using more modern browsers.

    For a CSS newbie stick with PX. EM can be a pain as they are fluid and you can have some weird effects and not sure why.

    Read this for more information on PX - EM - % - http://css-tricks.com/2580-css-font-size/

    Hope this helps.

提交回复
热议问题