When to Use Em vs. Rem

Both em and rem are flexible, scalable units which are translated by the browser into pixel values, depending on the font size settings in your design. 

While em is relative to the font-size of its direct or nearest parent, rem is only relative to the html (root) font-size.

原文地址:https://www.cnblogs.com/yk00/p/5165526.html