Is there a way to animate a word so that each letter changes color within a range of 7 colors, with all letters displaying different colors simultaneously in an infinite loop?
<div class="box">
<h1 class="logo animate__animated animate__bounceInDown">
<span class="cake d">D</span>
<span class="cake y">y</span>
<span class="cake n">n</span>
<span class="cake a">a</span>
<span class="cake m">m</span>
<span class="cake i">i</span>
<span class="cake x">x</span>
</h1>
</div>
The HTML code above separates the word using span tags and classes for each letter.
:root{
--primary: #22D2A0;
--secondary: #192824;
--back: #192824;
--green: #1FC11B;
--yellow: #FFD913;
--orange: #FF9C55;
--red: #FF5555;
--aqua: #00ffff;
--color: #fbff00;
--blue: #4d1461;
text-align: center;
}
I am looking for a solution to cycle through each letter of the word using a different color every millisecond with minimal code. I have attempted to animate each letter individually, but it resulted in bulky code. Additionally, if there is a way to pause the animation on hover using JavaScript, that would be ideal.