I have a line of text for which I want each word to become highlighted
(change background color) when the mouse cursor hovers over it, but
with one catch: when hovering over a word, it should highlight not only
itself but also every word following it until the end of the sentence.
So far, I have only been able to do this through Javascript onMouseOver
and onMouseOut events, identifying each word by an 'id' attribute and
changing its background color accordingly. All this makes the HTML
quite lengthy, and I was wondering if there would be a cleaner way to
do this using only CSS?
Thanks