-
Notifications
You must be signed in to change notification settings - Fork 0
/
css11.html
45 lines (39 loc) · 1.13 KB
/
css11.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
<!--
Animation Effect of CSS3
1/ Animation-
It is used to the Animation on our webpage. To create animation we need to use keyframes rule.
@keyframe rule -
It is used to control the intermediate steps.
-->
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#aa{
width: 200px;
height: 150px;
background-color: darkred;
position: relative;
animation: abc 5s /*infinite*/;
}
@keyframes abc
{
0%{background: red;top: 0px; left: 0px;}
15%{background: radial-gradient(red,darkred,blue,purple); top: 100px; left: 100px;}
30%{background: linear-gradient(yellow,darkred,blue,purple,green,orange);top: 200px; left: 150px;}
60%{background: radial-gradient(red,darkred,blue,purple,green); top: 300px; left: 200px;}
`
75%{background: purple;top: 450px; left: 300px;}
90%{background: royalblue;top: 500px; left: 200px;}
100%{background: black;top: 600px; left: 100px;}
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Animation Effect of CSS3</title>
</head>
<body>
<div id="aa">
</div>
</body>
</html>