我想用scaleY放大一个动画来填充一个视图。问题是它从中心开始,而不是从底部开始。如何更改它才能使动画从头开始?
const fillAnim = {
0: {
transform: [{ scaleY: 0 }]
},
0.25: {
transform: [{ scaleY: 0 }]
},
0.5: {
transform: [{ scaleY: 1 }]
},
0.75: {
transform: [{ scaleY: 1 }]
},
1: {
transform: [{ scaleY: 0 }]
}
};对于这个动画,我使用了react-native-animatable。
发布于 2021-05-25 00:15:54
transform-origin: bottom;应该可以解决这个问题。
https://stackoverflow.com/questions/67675221
复制相似问题