css animation
i have a position absolute element which has this:
earlier it was:
earlier it had a animation of this:
what should be the updated animaton for the updated top and left values?
9 Replies
don't crosspost your questions @curator
Impossible to say without more information, it completely depends on what you want the animation to do, and where you want it to end up... the start and end are two different things so 🤷
I will say though, that it's better not to animate the
top
property, and instead animate where it is with translate
instead though.this was the original animation with the original these:
this is what now after changing top and left to these:
need the exact same animation like this
but while changing the values, always something goes wrong
also thanks for replying kevin
this is the latest animation:
also @Kevin any resource where i can learn animations?
The left value is different for each keyframe, so it's going to move around. I'd probably keep that the same for all the keyframes. The 0% one has a top of 36, then it goes to 14, then 20, so it's going to move up and down too.
The easiest might be to simply remove the 50% one all together.
Also, the animation will run, then it'll go back to wherever it started, might be a good idea to add
forwards
to when you declared the animation... I'd put forwards
instead of infinite
, infinite is only if you want the animation to keep playing over and over again.
I'm not sure about a specific course though, sorrygot it working, not accurate, but looks good, had to change the orignial values, playing with google maps kinda tricky
thank you
well you are The Kevin Powell!
you can come up with something, will love to learn by you