I have a unique text animation that loads when the page loads. The characters will be gradually written to the screen with some words having a gradient effect. While I've managed to successfully apply the gradient, there seems to be a pause when it reaches the span
tag before continuing to output each character with the gradient applied.
To see my closest working version of this requirement, check out my CodePen: https://codepen.io/Kelly-Gold/pen/oNPJaYL
In order to demonstrate the issue, I captured screenshots at the beginning and end of the gradient application showing unexpected HTML characters. Once the entire line is output, the result is as desired, but the process isn't smooth and displays unwanted characters along the way.
Text appearance upon arrival at the span tag: https://i.stack.imgur.com/3sW8o.png
Text appearance after completing the gradient and reaching the closing span tag: https://i.stack.imgur.com/17Ica.png
Text appearance at the conclusion of the line: https://i.stack.imgur.com/pf9wv.png
I'm struggling to make the animation fluid without pauses and prevent the display of characters at the beginning and end of the span
tag.
Desired functionality:
- Output characters one by one per line with a brief pause at the end of each line
- Apply gradient effect to specific words
- Ensure no pause when reaching a gradient word, allowing for smooth flow like regular black text
- Avoid any visible HTML tags during runtime