Folder Structure
Codes
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap" rel="stylesheet">
<title>Animated Text</title>
</head>
<body>
<div class="container">
<h2>
<span style="--t:1">C</span>
<span style="--t:2">o</span>
<span style="--t:3">s</span>
<span style="--t:4">a</span>
<span style="--t:5">s</span>
<span style="--t:6;margin-left:0.5em;">L</span>
<span style="--t:7">e</span>
<span style="--t:8">a</span>
<span style="--t:9">r</span>
<span style="--t:10">n</span>
<span style="--t:11">i</span>
<span style="--t:12">n</span>
<span style="--t:13">g</span>
</h2>
<h3>
<span>YouTube</span> <span>Channel</span>
</h3>
</div>
</body>
</html>
CSS
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
.container{
width: 100%;
height: 100vh;
background: #1b1f29;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
h2{
font-size:8vw;
color: transparent;
margin-bottom: 0.5em;
}
h2 span{
animation: textanim 2s linear infinite;
animation-delay: calc(0.1s * var(--t));
}
h3{
font-size:6vw;
color: #f66335;
text-transform: uppercase;
-webkit-box-reflect: below -62px linear-gradient(transparent, #f66333);
}
h3 span{
animation: textanim2 5s linear infinite;
}
h3 span:nth-child(even){
animation-delay: 1s;
}
@keyframes textanim{
0%{
color:#fff;
filter: blur(1px) hue-rotate(0deg);
text-shadow:0 0 10px #f66335, 0 0 20px #f66335, 0 0 40px #f66335, 0 0 80px #f66335,
0 0 150px #f66335, 0 0 200px #f66335, 0 0 300px #f66335, 0 0 400px #f66335;
}
40%,80%{
color:#fff;
filter: blur(1px) hue-rotate(360deg);
text-shadow:0 0 10px #f66335, 0 0 20px #f66335, 0 0 40px #f66335, 0 0 80px #f66335,
0 0 150px #f66335, 0 0 200px #f66335, 0 0 300px #f66335, 0 0 400px #f66335;
}
100%{
color:transparent;
filter: blur(1px) hue-rotate(0deg);
text-shadow:none;
}
}
@keyframes textanim2{
0%, 20%, 50%, 60%, 80%, 90.1%, 95%{
color:#f66335;
text-shadow:none;
}
20.1%, 50.1%, 60.1%, 80.1%, 90%, 95.1%, 100%{
color:#fff;
text-shadow:0 0 10px #f66335, 0 0 20px #f66335, 0 0 40px #f66335, 0 0 80px #f66335,
0 0 160px #f66335, 0 0 300px #f66335, 0 0 400px #f66335;
}
}
YouTube Video
Download Source Code
Don’t forget to share this post!
Click Here : To Show Your Support! 😍