반응형
우리는 원하는 만큼 애니메이션을 만들고 재생시킬 수 있다.
<!DOCTYPE html>
<html lang="kr">
<head>
<title>The Nick Times</title>
<style>
@keyframes superSexyCoinFlip {
from {
transform: rotateX(0);
}
to {
transform: rotateY(360deg);
}
}
img {
border: 10px solid black;
border-radius: 50%;
animation: superSexyCoinFlip 5s ease-in-out;
}
</style>
</head>
<body>
<img src="img/pic.jpg" />
</body>
</html>
결과
마우스 오버를 하지 않아도 이미지가 로테이트 된다.
(참고) ease-in-out 다음에 infinite 를 넣으면 무제한 반복됨 ㅋㅋ
반응형
'2. CSS' 카테고리의 다른 글
CSS animation(애니메이션) 예시 종류 (0) | 2024.12.09 |
---|---|
CSS animations (애니메이션) 단계 나눠서 세분화하기 (0) | 2024.12.09 |
CSS transform 종류 예시 (1) | 2024.12.09 |
CSS transform 결합시키기 (1) | 2024.12.09 |
CSS transformation: 박스 element를 변형시키지 않는다. (0) | 2024.12.09 |