How to use PX and em? Summary of PX, em instance usage in CSS

Source: Internet
Author: User
In the domestic website, including three portals, as well as "leading" China's web design trend of the blue ideal, chinaui, etc. are used PX as a font unit. Only Baidu somehow made an adjustable example. On the other side of the ocean, almost all mainstream sites use EM as a font unit, which is also adjustable. Yes, PX is much easier to use than EM, and most readers don't know what em is or how many px it's worth.  Foreign people attach great importance to website usability (accessibility), not only because of its rooted human spirit, the direct reason may be because there is a law to restrain them-for example, Section 508 in the United States, forcing the site to achieve a certain degree of ease of use. Key points: 1. Previously IE could not adjust those using PX as the unit font size, but now almost IE is supported; 2.  Most of the foreign sites can be adjusted because they use the EM as a font unit;  3. Firefox can adjust px and em, but more than 96% of Chinese netizens use IE browser (or kernel). px Pixels (Pix

1. The difference between the unit PX and EM in CSS

Introduction: In the domestic website, including three major portals, as well as "leading" Chinese web design trend of the blue ideal, chinaui, etc. are used PX as a font unit. Only Baidu somehow made an adjustable example. On the other side of the ocean, almost all mainstream sites use EM as a font unit, which is also adjustable. Yes, PX is much easier to use than EM, and most readers don't know what em is or how many px it's worth. Foreign people attach great importance to website usability (accessibility), not only because of its rooted human spirit, the direct reason may be because there is a law to restrain them-for example, Section 508 in the United States, forcing the site to achieve a certain degree of ease of use.

2. The difference between PX, EM, and REM in CSS

Introduction: I believe that every front-end engineers have such an experience, the domestic designers mostly like to use PX, and foreign sites mostly like to use EM and REM, then what is the difference between the three, and what are their merits? The following article is a small series to give you a detailed introduction of the CSS in the PX, EM and REM differences, the need for friends can refer to the following to see together.

3. Common font units in CSS: The difference between px, EM, REM, and% _html/css_web-itnose

Summary: Common font units in CSS: The difference between px, EM, REM, and%

4. px, EM, rem_html/css_web-itnose of style units

Description: px, EM, REM for style units

5. CSS3 px, EM and rem_html/css_web-itnose

Introduction: CSS3 px, EM and REM

6. You should know the CSS text size unit px, EM, pt_html/css_web-itnose

Summary: You should know the CSS text size units px, EM, PT

7. px, EM, rem detailed _html/css_web-itnose in CSS

Introduction: PX, EM, rem in CSS

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.