How often is the default font size in the browser not 16px?

前端 未结 3 1732
忘掉有多难
忘掉有多难 2021-01-04 04:41

After writing a great big answer to the question Is it bad to work with pixels in CSS? in which I concluded that there\'s normally nothing wrong with it provided you underst

相关标签:
3条回答
  • 2021-01-04 05:21

    I'm not sure if you've found much by way of google but this search bought up this page as hit 1: http://www.oreillynet.com/xml/blog/2006/03/more_statistics_on_user_clicks.html

    Incidentally this question is on page one of the search too :)

    Its from 2006, but the first bit has a little about the font size settings in IE.

    I doubt there is any documented data for this specific thing.

    One thing I can tell you is that in over 10 years of working around computers I've seen about 1 in 10 users having a above default DPI setting. eg. 120 that caused the font size to be bigger than 16px in their browser. It also caused layouts that weren't styled properly to break.

    0 讨论(0)
  • 2021-01-04 05:29

    This avoids answering your question, but IMHO such statistics shouldn't matter even if it were near zero percent.

    Even if 16px were the de-facto standard, you should start from the position that this is something that the designer doesn't ultimately control, and it should be left up to the user to choose their font size. Your decision process should lead to designs that are flexible based on the user's needs.

    0 讨论(0)
  • 2021-01-04 05:37

    Late reply to the question; Defining your font size to a fixed size (px) or (pt) would mean that your site visitor can't increase the size of your Web page text. You might say "great", but this doesn't allow someone with visual disabilities to adjust browser settings to increase font size. If you're designing a website for the general public or for the government, this is a big "no-no".

    To be on the safe side use relative measurements (em) or (%) that allow for font adjustment in a browser.

    0 讨论(0)
提交回复
热议问题