【问题标题】:How scale up from the bottom of an view in react native?react native 如何从视图底部放大?
【发布时间】:2021-08-12 22:40:35
【问题描述】:

我想用 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。

【问题讨论】:

标签: css react-native react-native-animatable


【解决方案1】:
transform-origin: bottom;

应该解决问题。

【讨论】:

  • transform-origin 在 react-native 中不支持
  • 同样的错误,你能解决吗?
猜你喜欢
  • 2020-05-01
  • 2021-08-19
  • 2018-06-21
  • 1970-01-01
  • 2021-10-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多