본문 바로가기
웹코딩 배우기/· CSS

transition+transform

by 닐기 2021. 8. 24.

See the Pen transition+transform by nilgi (@nilgi) on CodePen.

 

전환과 변형을 같이 쓰는 방법

 

.box {
transition: width 2s, height 2s, transform 3s; // 전환에 변형 시간을 걸어주고
}

.box:hover {
width: 200px;
height: 200px;
transform: rotate(360deg); // 마우스hover에 변형값을 넣어준다.
}