Chrome not respecting rem font size on body tag?

前端 未结 7 866
北恋
北恋 2020-12-08 22:37

I\'ve taken to using rem\'s to size fonts in recent projects, then using px as a fallback for older versions of IE.

I\'ve also been setting a font

7条回答
  •  执笔经年
    2020-12-08 22:56

    The answer of Patrick is right. We have the same issue on Android 4.4.3 WebView.

    Before:

    html {
        font-size: 62.5%;
    }
    
    body {
        font-size: 1.6rem;
    }
    

    After:

    html {
        font-size: 62.5%;
    }
    
    body {
        font-size: 1.6em;
    }
    

    With em and not rem, it works !

提交回复
热议问题