开发者

Which measurement is best to use? [duplicate]

This question already has answers here: 开发者_StackOverflow Closed 12 years ago.

Possible Duplicate:

Why em instead of px?

em

or

px

or

%

I always found px to be better, but why do people use em?


px is good, if you design for a single browser, screen dimensions, fonts, etc. This way you explicitly set the size of the elements of the page, and no exceptions are possible.

If your site is getting viewed in various platforms/browsers, where screen size varies, some fonts are unavailable, the user changes the browser font size, etc., then it becomes a good idea to use abstract measurements, such as em or %, because using them the system tries to automatically calculate sizes, thus making it harder for text to be truncated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜