1 min readJun 12, 2018
Hey Jernej Tratnik đź‘‹
This depends on the animation-timing-function
. And also how you define smooth. If you use steps
in the animation-timing-function
, it will jump. But if you use other values, it will be smooth. However, it also depends on what is in your keyframes.
For example;
@keyframes move {
0% {
transform: translate(0, 0);
}
25% {
transform: translate(25vw, 0);
}
50% {
transform: translate(50vw, 0);
}
75% {
transform: translate(75vw, 0);
}
100% {
transform: translate(100vw, 0);
}
}
Would have a little pause before each keyframe as it slows and then starts again.
Whereas the following would just move an element smoothly from one point to another.
@keyframes move {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(100vw, 0);
}
}
You could still introduce other keyframes in the same animation that could change other properties and the movement would still be smooth đź‘Ť
Hope that helps!