Why does font-size not use rem after the mobile terminal does media query?

Xiaobai doesn"t understand. In the process of doing mobile, you can use rem, for everything. But after media query, why can"t you use rem instead of px to set the font font-size in the page?

Mar.10,2021

doesn't understand your question. Setting the root element font-size for media query to adapt to rem is also a solution. Why can't rem be used


who said that? Still use


does not say that it cannot be used at all, just because fonts may generally do some hint optimization for certain sizes (such as 14pxmem16px.18px, etc.) (can be understood as special visual processing). If you use rem units, you may not be able to fit the hint and cannot be accurate to the integer size, and the font may look a little blurry. You can do the multi-model test yourself. If the effect is acceptable, then there is no problem.

Menu