Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- node
- HTML
- Review
- for loop
- CSS
- textContent
- keyup
- react
- beforeinput
- TypingEffect
- dotenv
- Empty
- yet
- es6
- Temporal dead zone
- js
- UI
- Event
- addEventListener
- ES5
- node.js
- innerHTML
- a11y
- javascript
- Dom
- keyboardEvent
- nodeValue
- modal
- innerText
- css:position
Archives
- Today
- Total
the murmurous sea
CSS: em vs. rem 본문
1. both
Font size units.
Flexible, scalable units which are translated by the browser into pixel values,
Both rem and em are relative units, px is not.
2. em
: em inherits and scales relative to the font size of the element on which they are used.
: Assumes the parent is 1em(100%). Children inherit size by scaling in relation to the parent size.
: The name em was originally a reference to the width of the capital M in the typeface and size being used, which was often the same as the point size.
3. rem
: rem is only relative to the root(HTML). Root em
'#dev > 개념정리' 카테고리의 다른 글
Poptrox (0) | 2020.04.13 |
---|---|
@-ms-viewport {width: device-width;} (0) | 2020.04.13 |
CSS: flexbox (0) | 2020.04.07 |
CSS: alignment (0) | 2020.04.04 |
CSS: inline-block (0) | 2020.04.04 |
Comments