css3 animations frame by frame

前端 未结 1 1887
无人及你
无人及你 2021-01-20 16:38

I need to do an animation frame-by-frame changing a background-position of an element. I need to do this WITHOUT easing or linear animation, just changing the background-pos

相关标签:
1条回答
  • 2021-01-20 17:08

    Yes it is via the new step-function easing curves property.

    Instead of "ease-in" etc. use "step-start" or "step-end" which will make the transition happen instantaneously either at the beginning or end of the time period specified in transition-duration.

    You can also have multiple steps: "steps(N, start | end ])" which will have the transition happen in equally spaced steps.

    AFAIK this is only supported in Chrome to date.

    0 讨论(0)
提交回复
热议问题