Method 1: Just swap background-image property on hover
We can use background-image property and add two different images so that two different images will be served.
Just like this:
This is how it will work:
Method 2: Use position:absolute to set images on top of each other
We can also use position:absolute to set the images on top of each other but hide the image on top. On hover, show that hidden image.
Just like this:
This is how it will work:
background-image examples hover image position swap