<div class="container">
<h1>
<span>k</span>
<span>.</span>
<span>m</span>
<span>e</span>
<span>s</span>
<span>b</span>
<span>a</span>
<span>h</span>
</h1>
</div>
html,
body {
height: 100%;
overflow: hidden;
}
body {
width: 100%;
height: 100vh;
display: grid;
place-content: center;
background: #333;
background: no-repeat 50% / cover url(//unsplash.it/1000);
}
h1 {
font: italic bolder 50px sans-serif;
text-transform: uppercase;
white-space: nowrap;
position: relative;
display: block;
width: 350px;
height: 80px;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
border-radius: 30px;
&::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 130%;
height: 130%;
transform: translate(-50%, -50%);
filter: blur(20px);
background: #0007;
z-index: -1;
}
span {
color: #fff;
display: inline-block;
animation: name 2s cubic-bezier(0.4, 1.4, 0.75, 0.9) infinite;
&:first-of-type {
animation-delay: 2s;
}
&:nth-of-type(2) {
animation-delay: 1.2s;
}
&:nth-of-type(3) {
animation-delay: 0.5s;
}
&:nth-of-type(4) {
animation-delay: 5.2s;
}
&:nth-of-type(5) {
animation-delay: 3s;
}
&:nth-of-type(6) {
animation-delay: 1.9s;
}
&:nth-of-type(7) {
animation-delay: 1s;
}
&:last-of-type {
animation-delay: 4s;
}
}
}
@keyframes name {
5% {
transform: scaleX(5000) translateY(5px);
opacity: 0.1;
text-shadow: 1px 1px orange;
text-decoration: 0;
}
10% {
transform: scaleX(1) translateY(-50px);
opacity: 0.5;
text-shadow: -1px -1px tomato;
}
15% {
transform: scaleX(0) rotate(360deg);
opacity: 0.8;
text-shadow: -2px -2px red;
text-decoration: 0;
}
20% {
transform: scaleX(1) translateX(5px);
opacity: 1;
text-shadow: 2px 2px pink;
}
21% {
text-shadow: 0px 0px 20px brown;
transform: scaleY(0.5) translateX(-5px);
text-decoration: 0;
}
22% {
text-shadow: 0px 0px 0px #f358;
text-decoration: 0;
transform: scaleY(1) translateX(0);
text-decoration: underline overline line-through #0005;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.