我正在使用react-motion来循环浏览一堆图像。我正在尝试在一段时间后以编程方式更改背景。
发布于 2016-09-24 03:18:23
组件呈现应该是这样的。Motion和spring来自“react-motion”包。有关更多详细信息,请查看code for the photo demo。
<Motion style={{height: spring(currHeight), width: spring(currWidth)}}>
{container =>
<div className="demo4-inner" style={container}>
{configs.map((style, i) =>
<Motion key={i} style={style}>
{style =>
<img className="demo4-photo" src={`./${i}.jpg`} style={style} />
}
</Motion>
)}
</div>
}
</Motion>https://stackoverflow.com/questions/39667161
复制相似问题