Repository navigation
Expand file tree
/
Copy pathanimation.html
More file actions
68 lines (59 loc) · 1.66 KB
/
Copy pathanimation.html
File metadata and controls
68 lines (59 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
div{
background-color: rgb(0, 37, 221);
width: 100px;
height: 100px;
animation-name: abc;
animation-duration: 2s;
animation-timing-function: ease-in-out;
animation-delay: 1s;
animation-iteration-count: infinite; /* number or infinite - and by default value is 1 */
animation-direction: alternate;
animation-fill-mode: both; /* forwards backwords both none */
animation-play-state: paused; /* running paused */
}
@keyframes abc{
0%{
transform: rotate(360deg);
}
25%{
background-color: red;
}
50%{
background-color: yellow;
}
100%{
width: 500px;
height: 500px;
border-radius: 50%;
background-color: rgb(255, 0, 195);
}
}
div:hover{
animation-play-state: running;
}
</style>
</head>
<body>
<div>
Animation
</div>
</body>
</html>
<!--
animation : animation-name animation-duration animation-timing-function
animation-delay animation-iteration-count animation-direction
animation-fill-mode animation-play-state
-->