0
Make a cool rainbow highlight effect for text using JavaScript
I want the letters of a certain text on my webpage to change colours one by one but before one letter changes colour, the previous letter must return to it's normal state. In a nut shell, each letter of the word must get highlighted in a certain colour IN TURN. Could you please refer me to a code or design one. Any help will be greatly appreciated. Thanks in advance!
3 ответов
+ 5
use JavaScript.
1.Get div by its id,
2.Get it's value to any var
3.Use loop and add each letter to sibling div inline-block
4.one by one change color of every sibling to highlited color others to default
5. Run code on hover
+ 1
sorry, can't. you have to do it alone
0
@shadoff thank you for answering, I am but rusty on DOM could you please elaborate on point 3 and 4