I am trying to offset the div element. I just use:
$("#myBox").addClass("moveDown");
.moveDown {
animation:mymove 1s ease-out forwards;
-webkit-animation:mymove 1s ease-out infinite;
}
@keyframes mymove {
from {top:0px; opacity: 0;}
to {top:100px; opacity: 1}
}
@-webkit-keyframes mymove {
from {top:0px; opacity: 0;}
to {top:100px; opacity: 1;}
}
which works great: my drawer moves smoothly 100 pixels down, but when the animation is over, it goes back to its original position: any idea on how to do this?
I do not want to use the jquery animation function because it is not smooth enough with jquery.
source
share