-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSS-animation-fill-mode.html
55 lines (54 loc) · 1.39 KB
/
CSS-animation-fill-mode.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSs Animation fill Mode</title>
<style>
.circle{
width: 50px;
height: 50px;
background: steelblue;
border: 1px solid slateblue;
color: snow;
border-radius: 50%;
display: grid;
place-items: center;
position: relative;
animation: move 3s ease-in-out 1s 4 alternate;
animation-fill-mode: forwards;
}
@keyframes move{
0%{
width: 50px;
height: 50px;
background: steelblue;
}
25%{
width: 100px;
height: 100px;
left:50px;
background: whitesmoke;
color: black;
}
50%{
width: 150px;
height: 150px;
left:150px;
background: tomato;
color: turquoise;
}
100%{
width: 200px;
height: 200px;
left:150px;
background: firebrick;
color: floralwhite;
}
}
</style>
</head>
<body>
<div class="circle"><span>Hello</span></div>
</body>
</html>