#login-form button{
color: white;
transition: color 0.2s ease-in-out; (o)
}
#login-form button:hover{
transition: color 0.2s ease-in-out; (x)
}
#login-form button{
color: white;
transition: color 0.2s ease-in-out;
}
#login-form button:hover{
color: blue;
}
-> button이 hover 될 때, transition이 발동하여
0.2초동안 color값이 white에서 blue로 변화한다.
ex) : hover, : active, : focus, : nth-child()
- translate : element를 각각 x축과 y축으로 지정한 값만큼 이동시킨다.
(단위 : px, %)- scale : element를 x축과 y축으로 지정한 값만큼 크기를 변경한다.
(단위 : 배수)- rotate : element를 지정한 값만큼 회전시킨다.
(단위 : deg(각도))- skew : element를 x축과 y축으로 지정한 값만큼 왜곡시킨다.
(단위 : deg(각도))
@keyframes 애니메이션이름 { from{} to{} } 입력 후,
애니메이션이 생겼으면 하는 element에
animation: 애니메이션이름 시간 효과 를 넣어준다.
@keyframes study {
from { transform: rotateX(0);}
to { transform: rotateX(360deg);}
}
img {
animation: study 5s ease-in-out infinite; }
-> 여기서 infinte는 연속재생을 의미
-> 애니메이션을 마지막 상태에서 멈추고 싶을 때,
animation: 항목에 forwards를 추가한다.