전체 클래스 보기
업계 전문가가 강의하는 클래스 23,500개를 수강하세요.
The position property
- [Presenter] The position property is a technique used to position elements by changing the flow of the document. It has five values, static, relative, absolute, fixed, and sticky. The default position for elements is static, which means they are not positioned. For the other values, the box offset properties, top, right, bottom, and left must also be used to specify the placement of the positioned elements. Let's use a code pen example to see how these position values work. Starting with relative positioning, scroll down to the relative class and uncomment the position relative style. We won't see any changes yet because relative is the only positioned element that stays in the normal layout flow. So none of the surrounding elements will be affected either but all positioned elements can be moved using the offset properties. A top value of 20 pixels will offset the element 20 pixels from the top of its current…
연습 파일로 실제로 따라해 보세요.
강사가 이용하는 파일을 다운로드하세요. 클래스를 보면서 직접 따라할 수 있습니다.