Answers for "when to use em and when to use rem"

CSS
4

em vs rem

1EM or 1REM (r = root em)
The difference is inheritance.
The Rem value is based on the root element (html).
What is meant here is the font size for html and not the font size for the documet body.
... Em is based on the font size of each
Parent element.
Posted by: Guest on July-04-2020

Code answers related to "when to use em and when to use rem"

Browse Popular Code Answers by Language