4,545,707 th visitor since 2017.2.1 ( Today : 2099 )
Programming
No. 786
Name. swindler
Subject. position 속성
Main Cate. CSS
Sub Cate.
Date. 2017-01-25 10:55
Hit. 1613 (121.78.49.66)
File.
position : static
초기값으로 위치를 지정하지 않는 것과 동일
앞에 설정된 position을 무시할때 사용
top, bottom, left, right 속성값이 적용되지 않음


position: relative
static의 원래 위치부터 계산함
top, bottom, left, right와 같이 설정할 수 있음

#relative {
position: relative;
left: 100px;
}


position: absolute
relative와 달리 원래 위치와 상관없이 위치를 지정할 수 있음.
단, 가장 가까운 상위 요소를 기준으로 위치가 결정됨 (static은 제외)

#absolute {
position: absolute;
left: 100px;
}


position: fixed
브라우저의 상대 위치임
따라서 화면이 바뀌더라도 고정된 위치를 설정 할 수 있음 (상위 요소에 영향을 받지 않음)
IE7, IE8 은 position:fixed 값이 적용되지 않음



* position 속성은 상속되지 않음

[바로가기 링크] : http://coolx.net/cboard/develop/786



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog