forked from 4iz268/cviceni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss-animation.html
71 lines (47 loc) · 1.26 KB
/
css-animation.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
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS Animation</title>
<style type="text/css">
/* The animation code */
@keyframes example1 {
from {background-color: darkblue;} /* stejne jako 0% */
to {background-color: lightskyblue;} /* stejne jako 100% */
}
@keyframes example2 {
0% {background-color: black;}
25% {background-color: darkblue;}
50% {background-color: blue;}
75% {background-color: lightskyblue;}
100% {background-color: white;}
}
/* The element to apply the animation to */
div.one {
width: 100px;
height: 100px;
background-color: lightskyblue; /* pocatecni a konecny stav pozadi */
animation-name: example1;
animation-duration: 3s;
}
div.two {
width: 100px;
height: 100px;
background-color: black; /* pocatecni a konecny stav pozadi */
border: 3px solid black;
animation-name: example2;
animation-duration: 3s;
animation-delay: 3s;
animation-iteration-count: 3;
/* animation-iteration-count: infinite; */ /* nekonecne opakovani */
/* animation-direction: reverse; */ /* dozadu */
/* animation-direction: alternate; */ /* stridani - dopredu-dozadu-dopredu */
}
</style>
</head>
<body>
<div class="one"></div>
<br>
<div class="two"></div>
</body>
</html>