I have the following 2 classes:
.background-image {
background-image: url('../assets/artworkNight.png');
transition-property: background-image;
transition-duration: 10s;
}
.background-image:hover {
background-image: url('../assets/artworkDay.png');
}
So whenever I hover on .background-image
the background begins to slowly change over the course of 10 seconds. The problem is that if I unhover the image during second 4-5, it abruptly transitions back to the original image. I was wondering if it's possible to make to transition out the same way it transitions in. For example:
If I hover for 4 seconds, then unhover, I'd want it to take 4 seconds before it completely reverts back to the original image. Is this possible with CSS?