rem: root em refers to the size of the root font. The default root font size set by different browsers is not the same. Most of them are 16px, some are 14px, etc. The old version of Chrome supports a minimum of 12px, and the new version is the same as iOS Safari. This will lead to a result,
html{
font-size: 62.5%;
}
What you get in this way is not 16px * 62.5% = 10px; but 12px; (there is something weird here, the descendant elements refer to rem and the font reference is 10px; other references such as width and height are 12px). Regarding the font-size setting, it is customary to use 100px, and it is easy to calculate the mapping with px;
rem, whether the font-size settings of your html elements are consistent.
Better confirm
Written on both android and iOS
It may be a problem caused by the "Pingfang" font of ios9
For reference only
rem: root em refers to the size of the root font. The default root font size set by different browsers is not the same. Most of them are 16px, some are 14px, etc.
The old version of Chrome supports a minimum of 12px, and the new version is the same as iOS Safari. This will lead to a result,
What you get in this way is not 16px * 62.5% = 10px; but 12px; (there is something weird here, the descendant elements refer to rem and the font reference is 10px; other references such as width and height are 12px).
Regarding the font-size setting, it is customary to use 100px, and it is easy to calculate the mapping with px;
Has the poster solved it? I also encountered this problem. Please solve it
https://github.com/amfe/artic... Try this method