首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无限动画之间的延迟

无限动画之间的延迟
EN

Stack Overflow用户
提问于 2020-07-28 15:56:33
回答 1查看 80关注 0票数 2

我有无限的动画,来自react-animations库。你能告诉我有没有在动画周期之间制作delay的方法?据我所知,样式不可能做到这一点。

代码语言:javascript
复制
  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"),
  },
EN

回答 1

Stack Overflow用户

发布于 2020-07-28 17:31:58

您可以使用react-native中的Animated组件设置自己的动画,其中可能会出现延迟。

代码语言:javascript
复制
this._animatedValue = new Animated.Value(0);

Animated.timing(this._animatedValue, {
    toValue: 100,
    delay: 300,
    duration: 500
}).start()

https://animationbook.codedaily.io/introduction

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63129461

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档