开发者

Difference between em and px in font-size

开发者 https://www.devze.com 2023-04-13 09:06 出处:网络
I read in w3school - font-size property that the difference be开发者_JS百科tween using em and px is that when using px IE doesn\'t support resizing but em does.

I read in w3school - font-size property that the difference be开发者_JS百科tween using em and px is that when using px IE doesn't support resizing but em does.

I am working on IE7 and it works fine with px and re-size the text when zooming the page.

can any one explain this to me ?


px can be resized in IE as well. em is a relativ size to the inherited size by it's parent element and actually has the same meaning as %.

I don't think you can take any advantage by using em instead of px.


I believe old versions of Internet Explorer have this problem, but new versions fixed it. By the way, W3Schools is often considered a bad resource.


From memory, IE7 will scale / zoom the whole page, but if you select "Page/Text Size" from the menu to change the text size, that is when px or other absolute units are not scaled whereas relative units (eg: em's) are.

I expect you are doing a zoom rather than a Page/Text Size?

0

精彩评论

暂无评论...
验证码 换一张
取 消