JSFiddle - React, Tailwind, and code Playground
by Alimin
HTML
<html>
<head>
<title>Greeting</title>
</head>
<body>
<h1 class="ml2">Sunny mornings</h1>
</body>
</html>
CSS
.ml2 {
font-weight: 900;
font-size: 3.5em;
}
.ml2 .letter {
display: inline-block;
line-height: 1em;
}
JavaScript
$('.ml2').each(function(){
$(this).html($(this).text().replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>"));
});
anime.timeline({loop: true})
.add({
targets: '.ml2 .letter',
scale: [4,1],
opacity: [0,1],
translateZ: 0,
easing: "easeOutExpo",
duration: 950,
delay: function(el, i) {
return 70*i;
}
}).add({
targets: '.ml2',
opacity: 0,
duration: 1000,
easing: "easeOutExpo",
delay: 1000
});