Skip to content

Commit 711babc

Browse files
authored
Merge pull request #192 from czarjulius/youtube-icon-animation
Youtube icon animation
2 parents 876595e + 28ebe1f commit 711babc

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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>Youtube Icon</title>
7+
<link rel="stylesheet" href="style.css" />
8+
</head>
9+
<body>
10+
<div class="wrapper">
11+
<div id="button">
12+
<div id="arrow-in"></div>
13+
</div>
14+
</div>
15+
</body>
16+
</html>

Fronted Projects/czarjulius/style.css

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
body {
2+
width: 100vw;
3+
height: 100vh;
4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
}
8+
.wrapper {
9+
width: 50%;
10+
height: 50%;
11+
background-color: rgb(10, 1, 1);
12+
display: flex;
13+
justify-content: space-between;
14+
flex-direction: column;
15+
align-items: center;
16+
position: relative;
17+
border-radius: 5px;
18+
}
19+
#button {
20+
width: 10rem;
21+
height: 5rem;
22+
border-radius: 10px;
23+
border: 1px solid red;
24+
25+
animation-name: u-button;
26+
animation-duration: 6s;
27+
animation-fill-mode: forwards;
28+
position: absolute;
29+
bottom: 0%;
30+
z-index: 1;
31+
display: flex;
32+
justify-content: center;
33+
align-items: center;
34+
}
35+
#arrow-in {
36+
width: 0;
37+
height: 0;
38+
animation-name: u-arrow-in;
39+
animation-duration: 6s;
40+
animation-fill-mode: forwards;
41+
42+
z-index: 100;
43+
}
44+
45+
@keyframes u-button {
46+
0% {
47+
bottom: 10%;
48+
border: 1px solid rgb(11, 98, 219);
49+
}
50+
25% {
51+
border: 1px solid rgb(184, 195, 203);
52+
bottom: 20%;
53+
}
54+
75% {
55+
background-color: rgb(65, 10, 10);
56+
bottom: 35%;
57+
}
58+
100% {
59+
background-color: red;
60+
border: 0px solid none;
61+
bottom: 45%;
62+
margin: auto;
63+
}
64+
}
65+
66+
@keyframes u-arrow-in {
67+
0% {
68+
border-top: 25px solid transparent;
69+
border-left: 50px solid transparent;
70+
border-bottom: 25px solid transparent;
71+
}
72+
25% {
73+
border-top: 25px solid transparent;
74+
border-left: 50px solid transparent;
75+
border-bottom: 25px solid transparent;
76+
}
77+
75% {
78+
border-top: 25px solid transparent;
79+
border-left: 50px solid transparent;
80+
border-bottom: 25px solid transparent;
81+
}
82+
100% {
83+
border-top: 25px solid transparent;
84+
border-left: 50px solid #fff;
85+
border-bottom: 25px solid transparent;
86+
}
87+
}

0 commit comments

Comments
 (0)