1) transition
transition 속성 종류)
- transition-property
- transition-duration
- transition-timing-function
- transition-delay
2) transition-property
all : 모든 속성에 적용하며 기본값으로 사용된다
속성이름 : 전환 효과를 사용할 속성 이름 명시
코드 예)
div {
width: 100px;
height: 100px;
background-color: orange;
transition: width 0.5s;
}
div:active {
width: 300px;
background-color: royalblue;
}
3) transition-duration
0s : 전환 효과가 적용되지 않으며 기본값으로 부여된다
시간 : 지속시간을 지정 (예 : 1s)
코드 예)
div {
width: 100px;
height: 100px;
background-color: orange;
transition: width 0.5s, background=color 2s;
}
div:active {
width: 300px;
background-color: royalblue;
}
4) transition-timing-function
ease : 느리게 - 빠르게 - 느리게
linear : 일정하게
ease-in : 느리게 - 빠르게
ease-out : 빠르게 - 느리게
ease-in-out : 느리게 - 빠르게 - 느리게
5) transition-delay
0s : 대기시간 없으며 기본값으로 설정되어 있 다
시간 : 대기시간을 지정