Skip to content

Commit 980403b

Browse files
wavyBackground
1 parent b75fa94 commit 980403b

2 files changed

Lines changed: 99 additions & 0 deletions

File tree

wavyBackground/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Wave-background</title>
8+
<link rel="stylesheet" href="./style.css">
9+
</head>
10+
11+
<body>
12+
<section>
13+
<div class="wave">
14+
<span></span>
15+
<span></span>
16+
<span></span>
17+
</div>
18+
<div class="content">
19+
<h1>Bottom Wave Background</h1>
20+
</div>
21+
</section>
22+
</body>
23+
24+
</html>

wavyBackground/style.css

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
section {
8+
9+
position: relative;
10+
display: flex;
11+
width: 100%;
12+
overflow: hidden;
13+
height: 100vh;
14+
background: black;
15+
align-items: center;
16+
justify-content: center;
17+
}
18+
19+
section .wave {
20+
position: absolute;
21+
left: 0;
22+
width: 100%;
23+
height: 100%;
24+
background: #4973ff;
25+
}
26+
27+
section .content {
28+
position: relative;
29+
color: white;
30+
z-index: 1;
31+
font-size: 2em;
32+
font-family: cursive;
33+
text-transform: uppercase;
34+
}
35+
36+
section .wave span {
37+
position: absolute;
38+
width: 325vh;
39+
height: 325vh;
40+
top: 0;
41+
left: 50%;
42+
background: #000;
43+
transform: translate(-50%, -75%);
44+
45+
}
46+
47+
section .wave span:nth-child(1) {
48+
animation: animate 5s linear infinite;
49+
border-radius: 50%;
50+
background: rgba(20, 20, 20, 1);
51+
}
52+
53+
section .wave span:nth-child(2) {
54+
animation: animate 10s linear infinite;
55+
border-radius: 43%;
56+
background: rgba(20, 20, 20, .5);
57+
}
58+
59+
section .wave span:nth-child(3) {
60+
animation: animate 15s linear infinite;
61+
border-radius: 45%;
62+
background: rgba(20, 20, 20, .5);
63+
}
64+
65+
@keyframes animate {
66+
0% {
67+
transform: translate(-50%, -75%)rotate(0deg);
68+
69+
}
70+
71+
100% {
72+
transform: translate(-50%, -75%)rotate(360deg);
73+
74+
}
75+
}

0 commit comments

Comments
 (0)