-
Notifications
You must be signed in to change notification settings - Fork 1
/
animation_in_css.html
84 lines (73 loc) · 1.58 KB
/
animation_in_css.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
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ANIMATION IN CSS</title>
</head>
<style>
body{
margin: 0;
padding: 0;
}
.header{
height: 200px;
border: 2px solid black;
background: rgb(103, 253, 103);
}
.box{
font-size: 40px;
display: flex;
position: relative;
border: 2px solid red;
background-color: salmon;
width: 200px;
height: 200px;
animation-name:adarsh;
animation-duration: 2s;
animation-iteration-count:100 ;
/* animation-fill-mode: forwards; */
/* animation-fill-mode: alternate; */
/* animation-timing-function: ease-in; */
/* animation-timing-function: ease-in-out; */
/* animation-timing-function: ease-out; */
/* animation-delay: 10s; */
/* animation-direction: alternate; */
/* animation-direction: reverse; */
}
/*
@keyframes adarsh{
from{
width: 100px;
}
to{
width: 1300px;
}
} */
@keyframes adarsh{
0%{
top: 0;
left: 0;
}
25%{
top: 200px;
left: 0;
}
50%{
top: 200px;
left: 200px;
}
75%{
top: 0;
left: 200px;
}
}
</style>
<body>
<header class="header">
<div class="box">
01
</div>
</header>
</body>
</html>