Animation on click button
-
Hi,
It works fine when I add animation to a section to slide in but when I close it closes abruptly instead of reversing the animation
ie: doesn’t close smoothly back
I tried to override the CSS using
@keyframes and adding translateX but looks like you are controlling it with JS is their a trick I am missing I want the slide in to close like how smoothly it slides out.Basically, on click of button, it adds left: 100px but when I click close it still keeps left 100px and removes opacity to 0 and display none whereas it should also make left 100px to go back to 0;
This is a closed state https://prnt.sc/106u3le
This is an open state https://prnt.sc/106u44aHope it makes sense.
- The topic ‘Animation on click button’ is closed to new replies.