Css Transform.scale()不缩放给定空间
我已经使用API将我的Css Transform.scale()不缩放给定空间,css,react-native,animation,scale,css-transforms,Css,React Native,Animation,Scale,Css Transforms,我已经使用API将我的FlatList中心项的大小缩放了两倍,它工作得非常好。问题是没有缩放边距或填充,导致中心项目与上一个和下一个项目重叠 我的动画视图 <Animated.View style={{ alignItems: 'center', justifyContent: 'center', marginLeft: 6, marginRight: 6, width: 7
FlatList
中心项的大小缩放了两倍,它工作得非常好。问题是没有缩放边距或填充,导致中心项目与上一个和下一个项目重叠
我的动画视图
<Animated.View
style={{
alignItems: 'center',
justifyContent: 'center',
marginLeft: 6,
marginRight: 6,
width: 70,
height: 70,
borderRadius: 35,
borderColor: 'white',
position: 'relative',
borderWidth: 2,
transform: [
{
scale: animatedValue.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [1, 2, 1],
extrapolate: 'clamp'
})
}]
}}>
....other components
</Animated.View>
……其他组成部分
我还尝试将所有组件放入动画.View
中,并给它们加上边距或填充。仍然没有成功