Skip to content

Commit 184766c

Browse files
author
Akash Jambulkar
committed
added a new animation file
1 parent 710e57c commit 184766c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
/* The animation code */
6+
@keyframes example {
7+
0% {background-color: #e74c3c; transform: translate(0, 0) rotate(0deg);}
8+
25% {background-color: #f1c40f; transform: translate(200px, 0) rotate(90deg);}
9+
50% {background-color: #3498db; transform: translate(200px, 200px) rotate(180deg);}
10+
75% {background-color: #2ecc71; transform: translate(0, 200px) rotate(270deg);}
11+
100% {background-color: #e74c3c; transform: translate(0, 0) rotate(360deg);}
12+
}
13+
14+
/* The element to apply the animation to */
15+
div {
16+
width: 100px;
17+
height: 100px;
18+
position: relative;
19+
background-color: #e74c3c;
20+
animation-name: example;
21+
animation-duration: 4s;
22+
animation-timing-function: ease-in-out;
23+
animation-iteration-count: infinite;
24+
animation-direction: alternate;
25+
animation-fill-mode: both;
26+
}
27+
28+
body {
29+
display: flex;
30+
justify-content: center;
31+
align-items: center;
32+
height: 100vh;
33+
margin: 0;
34+
background-color: #f0f0f0;
35+
}
36+
</style>
37+
</head>
38+
<body>
39+
40+
<div></div>
41+
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)