<body>
<h1 data-text="HELLO!">HELLO!</h1>
</body>
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height: 100vh;
width: 100%;
background: radial-gradient(#480d35 ,#17151d);
display: grid;
place-items: center;
}
h1{
position: relative;
font-family: "Poppins", sans-serif;
color: #f6d8d5;
font-size: 150px;
}
h1:hover{
opacity: 0.9;
text-shadow: 0px -5px #ec2225, 0px 5px #00c2cb, -5px 0px #ec2225, 5px 0px #00c2cb;
}
h1::before{
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
color: #e0ffff;
z-index: -1;
}
h1:hover::before{
animation: animate 12ms ease-in-out infinite;
z-index: 1;
}
@keyframes animate{
0%, 100%{
top: -7px;
left: 0;
opacity: 1;
}
20%{
top: 0;
left: -10px;
opacity: 0.7;
}
40%{
top: 7px;
left: 0;
opacity: 0.2;
}
60%{
top: 0;
left: 10px;
opacity: 0.3;
}
80%{
top: 0;
left: 0;
opacity: 0.9;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.