728x90
아래는 freecodecamp에서 CSS 속성값에 대한 설명에 나오는 em과 rem
The two main types of length units are absolute and relative. Absolute units tie to physical units of length. For example, in and mm refer to inches and millimeters, respectively. Absolute length units approximate the actual measurement on a screen, but there are some differences depending on a screen's resolution.
Relative units, such as em or rem, are relative to another length value. For example, em is based on the size of an element's font. If you use it to set the font-size property itself, it's relative to the parent's font-size.
Note: There are several relative unit options that are tied to the size of the viewport. They are covered in the Responsive Web Design Principles section.
728x90