Javascript 无限动画之间的延迟
我有无限的动画,来自Javascript 无限动画之间的延迟,javascript,reactjs,Javascript,Reactjs,我有无限的动画,来自react animations库。您能告诉我是否有办法在动画周期之间进行延迟?据我所知,这是不可能做到的风格 import { rubberBand } from "react-animations"; import Radium, { StyleRoot } from "radium"; ... <StyleRoot style={styles.animation}> <Button /
react animations
库。您能告诉我是否有办法在动画周期之间进行延迟
?据我所知,这是不可能做到的风格
import { rubberBand } from "react-animations";
import Radium, { StyleRoot } from "radium";
...
<StyleRoot style={styles.animation}>
<Button />
</StyleRoot>
...
animation: {
animationDuration: "1s",
animationDelay: "0.5s",
animationTimingFunction: "ease-in-out",
animationIterationCount: "infinite",
animationName: Radium.keyframes(rubberBand, "rubberBand"),
},
从“react动画”导入{rubberBand};
从“镭”导入镭,{StyleRoot};
...
...
动画:{
动画持续时间:“1s”,
动画延迟:“0.5s”,
动画计时功能:“轻松进出”,
animationIterationCount:“无限”,
animationName:Radium.keyframes(橡皮筋,“橡皮筋”),
},
在可能延迟的情况下,您可以使用react native中的动画组件设置自己的动画
this._animatedValue = new Animated.Value(0);
Animated.timing(this._animatedValue, {
toValue: 100,
delay: 300,
duration: 500
}).start()