YOUTUBE LINK - CLICK HERE
SOURCE CODE - HTML :
<!DOCTYPE html>
<html>
<head>
<title>
Glowing text
</title>
<link href="glowing_text.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="word">
<span class="letter" style="--i:1">G</span>
<span class="letter" style="--i:2">A</span>
<span class="letter" style="--i:3">L</span>
<span class="letter" style="--i:4">A</span>
<span class="letter" style="--i:5">X</span>
<span class="letter" style="--i:6">Y</span>
</div>
<div class="hover-letter"></div>
</div>
</body>
</html>
CSS :
* {
padding: 0;
margin: 0px;
box-sizing: border-box;
}
.container {
width: 100%;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
background-image: linear-gradient(45deg, #247291, #680747);
}
.letter {
font-size: 60px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-weight: 500px;
color: #f5f9ee;
animation: glow 3s infinite;
animation-delay: calc(var(--i)*0.1s);
}
.word:hover {
filter: blur(3px);
cursor: pointer;
}
.word::before {
height: 10px;
background-color: #bef2ff;
content: " ";
display: block;
animation: length 3s infinite;
}
.word::after {
height: 10px;
background-color: yellow;
content: " ";
display: block;
animation: length 3s infinite;
}
@keyframes glow {
0% {
color: black;
}
100% {
color: #f5f9ee;
}
}
@keyframes length {
0% {
width: 0px;
}
100% {
width: 400px;
}
}
Post a Comment