Question: In CSS, how do you change background color right away on hover and then have it slowly fade back to its original color? Suppose on

In CSS, how do you change background color right away on hover and then have it slowly fade back to its original color? Suppose on https://codepen.io/impressivewebs/pen/zqpEg, I want to go from red to green instantaneously when you hover on, and I want it to take a while to slowly fade from green back to red when you hover off.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!