JSFiddle - React, Tailwind, and code Playground
by NicoO
HTML
<table>
<tr><td class="tdGo" style="background-color: #0000FF;"><span id="imgGo" class="imgGo"></span></td></tr>
</table>
CSS
table
{
width: 100%;
}
td span
{
margin: auto;
}
#imgGo {
display: block;
height: 28px;
width: 28px;
background-image: url(http://s3.postimg.org/giiu6sz73/gored.gif?noCache=1393616370);
background-position: 0% 0%;
position: relative;
}
#imgGo:after {
position: absolute;
width: inherit;
height: inherit;
top: 0;
left: 0;
content:"";
opacity: 0;
visibility: hidden;
transition-duration: 0.4s;
background-image: url(http://s28.postimg.org/y3fltsycp/gogreen.gif?noCache=1393616358);
}
#imgGo:hover:after {
opacity: 1;
visibility: visible;
}