-
Notifications
You must be signed in to change notification settings - Fork 0
/
Animations.html
43 lines (36 loc) · 1.26 KB
/
Animations.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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animationen</title>
<style>
div {
width: 100px;
height: 100px;
position: relative;
background-color: blue;
animation-name: example;
animation-duration: 5s;
animation-iteration-count: infinite;
}
/* @keyframes example {
from {background-color: blue;}
to {background-color: yellow;}
} */
@keyframes example {
0% {background-color: green; left: 0px; top: 0px;}
20% {background-color: aqua; left: 200px; top: 0px;}
40% {background-color: blueviolet; left: 200px; top: 200px;}
60% {background-color: crimson; left: 100px; top: 200px;}
80% {background-color: darkcyan; left: 0px; top: 200px;}
100% {background-color: firebrick; left: 0px; top: 0px;}
}
</style>
</head>
<body>
<h1>CSS Animation</h1>
<div></div>
<p><b>Hinweis:</b> Wenn die Animation durchlaufen ist, bleibt er beim vordefinierten Style (in dem fall Blau)</p>
</body>
</html>