I am trying to find out the best way to edit the transition between two states of CSS. I'm open to any suggestions. I am not super experienced with Javascript but am looking for some suggestions on where to look to get information or if I'm going about this in the completely wrong way. Anything will help.
So effectively I have javascript add a class to a div that will then change the CSS of that div when the class is applied. I'm looking for a way to transition between these two CSS states somewhat smoothly. Maybe I'm trying to find a "too simple" method of doing this, but this is the only thing that has worked for me.
Here is the code I'm currently using on playcode.io: https://playcode.io/650950
A CSS option would be preferable, but I think that this is outside of CSS's capabilities.
Thanks for any help in advance. :)
You might want to look into the transition property in css. It does exactly what you need, animate a change in another css property.