fillMode
Default | Type |
---|---|
auto | String | TypeCallback |
Be careful when using fillMode, it has some problems when it comes to concurrency of animations read more on MDN. I highly suggest using IAnimationOptions.persist, as it’s less permanent, or better yet use the IAnimationOptions.onfinish(…) method, with Animate.commitStyles(…) to commit styles.
Defines how an element should look after the animation. The fillModes availble are:
none
means the animation’s effects are only visible while the animation is playing.forwards
the affected element will continue to be rendered in the state of the final animation frame.backwards
the animation’s effects should be reflected by the element(s) state prior to playing.both
combining the effects of both forwards and backwards; The animation’s effects should be reflected by the element(s) state prior to playing and retained after the animation has completed playing.auto
if the animation effect fill mode is being applied to is a keyframe effect. “auto” is equivalent to “none”. Otherwise, the result is “both”.
You can learn more here on MDN.