@import url(“https://fonts.googleapis.com/css2?family=Roboto+Slab&display=swap”);
*,
*::before,
*::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
body {
font-family: “Roboto Slab”, serif;
}
$speed: 16s;
$wordCount: 7;
.morphing {
position: relative;
font-size: 120px;
background-color: #000;
color: #2fff;
min-height: 100vh;
filter: contrast(25) blur(-20px);
}
.word {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: word $speed infinite ease-in-out;
@for $i from 0 to $wordCount {
&:nth-child(#{$i + 1}) {
animation-delay: ($speed / ($wordCount + 1) * $i) – $speed;
}
}
@keyframes word {
0%,
5%,
100% {
filter: blur(0px);
opacity: 1;
}
20%,
80% {
filter: blur(1em);
opacity: 0;
}
}
}