CSS Animation "jumps"

When the animation ends, the red square moves upwards slightly. I tried replacing top: 200px; with top: initial but it doesn’t help. What’s going on?

Make a variable and set it so that when the character animation ends it saves its Y position and makes it stay in that same position forever, so that unwanted move doesn’t happen anymore!

1 Like

I fixed the issue - for top to work correctly the position has to be relative.