-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21_Animation.html
More file actions
76 lines (68 loc) · 2.01 KB
/
21_Animation.html
File metadata and controls
76 lines (68 loc) · 2.01 KB
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
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Css Animation</title>
<style>
.container{
height: 80vh;
width: 30vw;
background-color: aqua;
}
.box{
width: 24vw;
height: 25vh;
/* background-color: bisque; */
/* animation: thisisAnimation ; */
/* isme basically variable dalta hai jo seperately banta hai */
/* animation-duration: 3s; */
/* duration of time of animation or transition */
/* animation-iteration-count: 3; */
/* no. of times animation will repeat it can be infinite */
/* animation-timing-function: ease; */
/* speed of animation */
/* animation-delay: 2s; */
/* time after animation starts */
/* animation-direction:reverse; */
/* animation-play-state: paused ; */
animation: thisisAnimation 3s forwards 3s 1 ,
shub 3s ease-in-out 3s 1;
/* all in one */
}
@keyframes thisisAnimation{
from{
background-color: red;
}
to{
background-color: yellow;
transform: translatex(300px);
}
}
@keyframes shub{
0%{
transform: rotate(80deg);
}
20%{
transform: rotate(100deg);
}
50%{
transform: rotate(200deg);
}
80%{
transform: rotate(220deg);
}
100%{
transform: rotate(300deg);
}
}
</style>
</head>
<body>
<div class="container">
<div class="box">
box
</div>
</div>
</body>
</html>