我有无限的动画,来自react-animations库。你能告诉我有没有在动画周期之间制作delay的方法?据我所知,样式不可能做到这一点。
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"),
},发布于 2020-07-28 17:31:58
您可以使用react-native中的Animated组件设置自己的动画,其中可能会出现延迟。
this._animatedValue = new Animated.Value(0);
Animated.timing(this._animatedValue, {
toValue: 100,
delay: 300,
duration: 500
}).start()https://stackoverflow.com/questions/63129461
复制相似问题