Transition animation for background change
For smooth animation on a webpage, we should use the
opacity CSS property to animate changes in
background-color. But how? Use the pseudo element with a new
background-color value and toggle its
opacity value between 0 and 1!
If you’re not a Medium member, read this article here.
/* Set the default background color */