지정된 기능을 수행하는 요소
width: clac(50px + 50px)
width: clac(100% - 10px)
width: clac(2*100px)
width: clac(100%/4)
top, left, bottom, right을 사용하여 좌표값 변경static (기본값)
문서상 원래 있어야 하는 위치에 배치됨top, left, bottom, right 속성 사용 불가relative
원래 있던 자리(static)를 기준으로 요소의 위치를 조정.top {
position: relative;
top: 5px;
z-index: 1;
}
.right {
position: relative;
right: 5px;
}
.bottom {
position: relative;
bottom: 5px;
}
.left {
position: relative;
left: 5px;
}
position : relative 속성인 조상을 절대 좌표의 기준으로 삼는다 <body>가 기준#parent {
position: relative;
width: 100px;
height: 100px;
background: skyblue;
}
#child {
position: absolute;
right: 0;
}
fixed
viewport를 기준으로 요소의 위치를 조정sticky
부모 요소의 좌표를 기준으로 요소의 위치를 조정z-index: auto (기본값)
z-index: 1
z-index: 9990
transition-property: color, transform
transition-duration: 0.2s
transition-timing-function: linear /*동일한 속도로 이벤트 진행*/
transition-timing-function: ease-in /*처음엔 느리게 시작, 마지막엔 빠르게 진행*/
transition-timing-function: ease-out /*처음엔 빠르게 시작, 마지막은 느리게 진행*/
transition-timing-function: ease
/*처음엔 천천히 시작, 중간에 빨라지고, 마지막엔 느리게 진행*/
/*ease-in-out과 동일한 형태지만 보다 가파르게 진행*/
transition-timing-function: ease-in-out
/*처음엔 천천히 시작, 중간에 빨라지고, 마지막엔 느리게 진행*/
/*ease와 동일한 형태지만 보다 완만하게 진행*/
transition-delay: 2s
/*transition: property duration timint-function delay*/
/*어떤 요소를, 얼마나 오래, 어떤 방식으로, 언제 실행*/
transition: color 0.4s ease-in-out 1s