Javascript 如何设置速度反应水平滚动

Javascript 如何设置速度反应水平滚动,javascript,reactjs,animation,scroll,velocity.js,Javascript,Reactjs,Animation,Scroll,Velocity.js,我很难用velocity react库设置基本的水平滚动条。据我所知,每个道具在Velocity构造函数中都作为选项传递。但是,这些选项要求在某些DOM元素上设置容器值,这在渲染期间是不可能的。所以我的问题是,是否有可能设置滚动动画 <VelocityComponent animation="scroll" duration={1000} axis="x" runOnMount={true} offset="-49"> <div className="Products"&g

我很难用velocity react库设置基本的水平滚动条。据我所知,每个道具在Velocity构造函数中都作为选项传递。但是,这些选项要求在某些DOM元素上设置
容器
值,这在渲染期间是不可能的。所以我的问题是,是否有可能设置滚动动画

<VelocityComponent animation="scroll" duration={1000} axis="x" runOnMount={true} offset="-49">
  <div className="Products">
    { children }
  </div>
</VelocityComponent>

{儿童}