
- px : 픽셀
(width : 300px)- % : 상대적 백분율
(height : 1% ~ 100%)- em : 요소의 글꼴 크기 (1em -> 10px)
(div {
font-size: 20px;
width: 10em; / 200px /
})- rem : html 루트 요소 기준의 글꼴 크기
(div {
font-size: 20px;
width: 10rem; / 16px 10rem = 160px */
})- vw : 뷰포트(Viewport)의 가로 너비의 백분율
- vh : 뷰포트(Viewport)의 세로 너비의 백분율
(1) % : 상대적 백분율

<div class="parent">
<div class="child"></div>
</div>
...
.parent {
width: 500px;
height: 200px;
background-color: royalblue;
}
.child {
width: 50%;
height: 100%;
background-color: orange;
}