[CSS] CSS Position 속성 5가지 정리 (static, relative, absolute, fixed, sticky)
Position 이란?element 배치하는 방법을 지정해주는 속성이라고 하며static, relative, absolute, fixed, sticky 5가지가 있다.1. staticdefault 값으로 명시되어 있지 않을 경우 position : static; 으로 적용문서의 흐름에 따라 element 배치top, right , bottom, left, z-index 속성에 영향을 받지 않음HTML의 요소가 일반적인 흐름으로 배치되는 속성2. relative문서의 흐름에 따라 element 배치top, right , bottom, left 를 주면 static이었을 때의 위치에서 주어진 값만큼 이동static과 동일하게 일반적인 흐름으로 배치되는 속성차이점은 현재 자신의 위치를 기준으로 배치를 좀 더 ..
2024. 5. 13.