Chrome not respecting rem font size on body tag?

前端 未结 7 878
北恋
北恋 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条回答
  •  萌比男神i
    2020-12-08 23:08

    Try:

    html { font-size: 62.5%; } /* font-size: 62.5% now means that 1.0 rem = 10px */
    *{font-size: 1.4rem;line-height: 1.6rem; }
    body { background: #fff; font-family: arial;  }
    

    Seems to look better on refreshing the page :)

    FIDDLE

提交回复
热议问题