Is there a way to change the background image when hovering over a normal image without altering the original background image?
I attempted to achieve this using z-index values, but unfortunately it did not work as expected. You can view my attempt on this fiddle. It is important that the new image preloads so that users do not experience any delay in loading.
img{
width: 120px;
position: relative;
z-index: -1;
}
img:hover{
background-image: url('https://i.ibb.co/bsQL6SK/media13-3-blue.png');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
<img src="https://cdn.freebiesupply.com/logos/large/2x/fox-news-logo-png-transparent.png" alt="">