Is there a way to change an image when a user hovers over specific text within a list item? For example, hovering over the word "Hello" in a list item should trigger an image change.
<li id="li1"> <img id="img1" width="50" height="50"/>Hello</li>
#li1{
list-style:none
}
#li1:hover{
}
#img1
{
content: url('http://icons.iconarchive.com/icons/hopstarter/sleek-xp-software/256/Yahoo-Messenger-icon.png');
}
#img1:hover{
content: url('http://icons.iconarchive.com/icons/yellowicon/game-stars/256/Mario-icon.png');
}
I have only been able to achieve the image change when a user hovers over the actual image itself. Is there a way to accomplish this using CSS alone?