Summary: Here we reference Jorux's article "CSS needs to be rewritten for 95% of Chinese websites". The question is a bit scary, but it is indeed a defect in the production of domestic webpages. I have never been clear about the relationship and features between px and em. I have learned a lot since I saw it. In general, px is used to define the word body ,...
1. IE cannot adjust the font size that uses px as the unit;
2. The reason why most foreign websites can be adjusted is that they use em as the font unit;
3. Firefox can adjust px and em, but more than 96% of Chinese users use IE browser (or kernel ).
Px is an absolute unit and does not support IE scaling.
Em is a relative unit, and the text on the webpage can be scaled up or down. Use em for line-height and vertical height. Ensure integrity during scaling.
1. The em value is not fixed;
2. em will continue the font size of the parent element.
1. Declare Font-size = 62.5% in the body selector; (Font-size = 63%; For ie6 compatibility)
2. Divide your original px value by 10 and change it to em as the unit;
3. recalculate the em values of the enlarged fonts. Avoid repeated statement of font size.
Unit pt description
With px, em, %, and pt exchange tables