Skip to content

Commit c5e5714

Browse files
authored
Expanding Circle (#2889)
* adding my expanding circles animation to the project * I have fixed the errors as per the email, thanks
1 parent 7976766 commit c5e5714

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Expanding Circles by MarkwSch</title>
7+
<link rel="stylesheet" href="styles.css">
8+
</head>
9+
<body>
10+
<div class="container">
11+
<div class="circle one"></div>
12+
<div class="circle two"></div>
13+
<div class="circle four"></div>
14+
<div class="circle three"></div>
15+
</body>
16+
</html>
17+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"artName": "Expanding Circles",
3+
"githubHandle": "MarkwSch"
4+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
html {
2+
background: black;
3+
height: 100%;
4+
position: relative;
5+
overflow: hidden;
6+
}
7+
8+
body {
9+
margin: 0;
10+
height: 100%;
11+
display: flex;
12+
justify-content: center;
13+
align-items: center;
14+
15+
}
16+
17+
h1 {
18+
color: white;
19+
justify-content: center;
20+
align-items: center;
21+
font-size: 3em;
22+
}
23+
24+
.container {
25+
display: grid;
26+
position: absolute;
27+
grid-template-columns: repeat(2, 150px);
28+
grid-template-rows: repeat(2, 150px);
29+
gap: 0;
30+
height: 300px;
31+
width: 300px;
32+
}
33+
34+
.circle {
35+
width: 100px;
36+
height: 100px;
37+
border-radius: 50%;
38+
background: rgb(136, 226, 235);
39+
animation: expand-shrink 4s infinite, color-change 4s infinite;
40+
display: flex;
41+
justify-content: center;
42+
align-items: center;
43+
}
44+
45+
.one {
46+
animation-delay: 0s;
47+
}
48+
49+
.two {
50+
animation-delay: 1s;
51+
}
52+
53+
.three {
54+
animation-delay: 2s;
55+
}
56+
57+
.four {
58+
animation-delay: 3s;
59+
}
60+
61+
@keyframes expand-shrink {
62+
0%, 100% { transform: scale(1); }
63+
50% { transform: scale(1.3); }
64+
}
65+
66+
@keyframes color-change {
67+
0% { background: rgb(136, 226, 235); }
68+
12.5% { background: rgb(160, 218.5, 177);}
69+
25% { background: rgb(185, 211, 117.5); }
70+
37.5% {background: rgb(210, 204, 59.5);}
71+
50% { background: rgb(235, 196, 0); }
72+
62.5% { background: rgb(210, 204, 59.5); }
73+
75% { background: rgb(185, 219, 117.5); }
74+
87.5% { background: rgb(160, 218.5, 177) }
75+
100% { background: rgb(136, 226, 235); }
76+
}

0 commit comments

Comments
 (0)