Button transition smoothness

I’m wondering about button transition smoothness because in a previous website I made, the transition between hover and non-hover states was a smooth opacity change but now I can’t find a way to make that happen and when I hover it just instantly switches image without any animation.