Answer the question
In order to leave comments, you need to log in
Why does the animation only play once?
Hello. There is a panel that should go out on the right. I wrote the animation, but - it works only once, and the second and subsequent times it just appears without animation, here is the code:
animation-name: popup_from_right;
animation-duration: 0.2s;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
@keyframes popup_from_right {
0%
{
opacity: 0;
transform: translateX(100%);
}
100%
{
opacity: 1;
transform: translateX(0);
}
}
Answer the question
In order to leave comments, you need to log in
css animation also has events. You need to remove the animation class from the element on click, and then assign it again.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question