-
Notifications
You must be signed in to change notification settings - Fork 0
/
25_keyframes_two.html
60 lines (58 loc) · 1.36 KB
/
25_keyframes_two.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
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Keyframes Second Part</title>
<style>
body {
background: #333333;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
.box {
background: #f4f4f4;
width: 200px;
height: 200px;
/* display: flex; */
position: relative;
top: 0;
left: 0;
padding-top: 90px;
text-align: center;
/* justify-content: center; */
align-items: center;
animation: animate1 8s forwards ease-in-out;
}
@keyframes animate1 {
25% {
top: 0;
left: 300px;
background: yellowgreen;
border-radius: 50% 0 0 0;
}
50% {
top: 300px;
left: 300px;
background: orange;
border-radius: 50% 50% 0 0;
}
25% {
top: 300px;
left: 0;
background: blue;
border-radius: 50% 50% 50% 0;
}
100% {
top: 0;
left: 0;
border-radius: 50%;
}
}
</style>
</head>
<body>
<div class="box">
<h2>I am a single box</h2>
</div>
</body>
</html>