The CSS visibility property is set to Boolean, either on or off.
In order for any animation to work, regardless of whether it was performed with key frames, transitions or jquery, the start point and end point of the set of property values must be divided into several stages, with a large number of steps leading to a smoother animation.
For a simple effect like transition , it is best to see the fiddle here . Use javascript only to add / remove classes that trigger the transition
.hidden { opacity: 0; transition: opacity 0.5s ease-in; } .show-me { opacity: 1; }
You set the transition property, which defines the property for the transition, and then the length, the convenience function (which describes the changes in speed that the animation affects). You also need to define the start point and end point for your animated property, as you can see with two opacity values.
For recording - a keyframe is suitable if your effect was more complex, for example, so that one property is fully animated halfway, and then animated back, and the other fully or completely; and jQuery animation provides an easy way to act upon completion of the animation, which is also sometimes necessary.
source share