CSS style body font-size why use 625%

Source: Internet
Author: User

Browser's default height?
Generally for 16px .

Why use 62.5% as the body's default style?
16px62.5%= 10px . *

So why is it more generally

16px *625% = 100px;

As mentioned in the responsive web design practice, the Desktop browser default page font size is 16px, which is set to a specific pixel size or a corresponding percentage, the effect looks the same, but the default font size of other types of devices is not necessarily 16px, especially high-resolution devices, 16PX-size fonts look very small on top of them, so you can't set specific pixel values on the body, set them to percentages, and set the font size that's best for users to browse by setting the base font size for the device.
In the book: The most important thing is not the actual pixel size of the screen, the readability of the text on the screen is the most important

Since it is set to 62.5%, it is 1rem = 10px easy to use REM to specify the dimensions of the element, so that the response can be changed directly font-size without having to calculate the dimensions that appear in the various other styles. Another advantage of using REM to define dimensions is that it is more adaptable to scaling/browser setting font size (because REM changes synchronously relative to font size).

CSS style body font-size why use 625%

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.