Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/476.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 无限动画之间的延迟_Javascript_Reactjs - Fatal编程技术网

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()