Button hover effect working reversely
When I mouse over the button, transition effect only works after leaving from it. Can u help me please?
Live: https://results-summary-component-git-main-gsindar.vercel.app/
Code:
2 Replies
You can't transition to/from a gradient.
When you leave, the background is the light gray default of the button (cause it instantly turns off the gradient), and that transitions to your dark color
background
is a shorthand.
You have background-color
and background-image
, and we can't transition between two different properties (also, background-image
can't can't be animated/transitioned, so that means gradients can't be.)Thank you Kevin 🙏