I had some help yesterday with getting an image to fade in when hovering over another link, but I'm having a hard time figuring out how to get it to fade out. This might involve java? My apologizes, as I am quite new to more advanced coding (past basic CSS/HTML).
Here's what someone gave me yesterday, which fades in nicely, but id like it to fade out once you remove your mouse from the link.
img { opacity: 0; }
a:hover +img {
-webkit-animation: changeOpacity 5s;
animation: changeOpacity 5s;
}
@-webkit-keyframes changeOpacity {
0% { opacity: 0; }
100% { opacity: 1; }
}
/* Standard syntax */
@keyframes changeOpacity {
0% { opacity: 0; }
100% { opacity: 1; }
}
And this is the HTML:
<a href="http://lorempixel.com/300/300/sports/1">
Hover the see Full image,click to go there
</a>
<img src="http://lorempixel.com/300/300/sports/1" width="200" height="200" />
<br>
<a href="http://lorempixel.com/300/300/sports/1">
Hover the see Full image,click to go there
</a>
<img src="http://lorempixel.com/300/300/sports/1" width="200" height="200" />
Any help would be greatly appreciated!