Transition effect not working

The transition effect in the Id=“main” is not working on hover
Please help!
Thanks in advance!

To the best of my knowledge, you can not use transition with linear-gradient. There is a workaround which is a little more complex (see this Medium article) for how you could possibly do it.