我在 React 应用程序中使用 Ag-Grid 和
animateRows={true}
选项。
有没有办法以某种方式减慢动画速度?
可以通过调整“.ag-row-animation .ag-row”样式来调整动画
默认为
.ag-row-animation .ag-row {
transition:"transform 0.4s, top 0.4s, background-colour 0.1s, opacity 0.2s"
}
我发现添加 0.2 秒的小延迟效果很好:
.ag-row-animation .ag-row {
transition:"transform 0.2s 0.4s, top 0.2s 0.4s, background-colour 0.2s 0.1s, opacity 0.2s 0.2s"
}
过渡遵循标准 CSS 过渡参数,因此您也可以调整计时功能。