position1 [CSS] position position이란? css 문서상에서 요소를 배치할때 사용하는 속성입니다. 속성은 static, relative, absolute, fixed, sticky 총 5가지인데, 여기서는 static, relative, absolute를 집중적으로 알아보겠습니다. static position: static; 이 속성의 값은 기본값입니다. position에 대한 값을 쓰지 않으면 요소는 기본적으로 static으로 할당됩니다. 예시와 그림을 보겠습니다. 코드 더보기 html css .container { position: static; top: 40px; width:500px; height:400px; background-color: antiquewhite; } .ex2 { width: 200px; height.. 2021. 12. 21. 이전 1 다음 반응형