div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
animation: myfirst 5s linear 2s infinite alternate;
}
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
animation-name: example;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes myfirst {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation5
animation-fill-mode: forwards;
https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation_fill-mode
animation-fill-mode: both;
https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation_fill-mode3
처음으로 가서 멈춤
animation-fill-mode: backwards;
https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation_fill-mode2
animation-direction: alternate;
https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation_direction2
'CSS' 카테고리의 다른 글
table thead sticky 적용시 보더 투명해지면서 tbody 겹쳐 보일때 (0) | 2024.05.22 |
---|---|
VScode 디자이너를 위한 플러그인 세팅, CSS 위주 (0) | 2024.05.12 |
input radio 라디오버튼 모양 바꾸기 (0) | 2024.05.08 |
input date icon 달력 모양 바꾸기 (0) | 2024.05.08 |
header nav (0) | 2024.05.05 |
로컬에서 작업중 부트스트랩 등 cdn 연결 안될때 (0) | 2024.05.02 |
로티파일 html 에 넣기 (0) | 2024.04.29 |
input checkbox 체크박스를 이용한 부트스트랩 아이콘 토글 (0) | 2024.04.29 |