react-native设置scrollView水平垂直居中

厍浩广
2023-12-01

react-native设置scrollView水平垂直居中

scrollView有一个contentContainerStyle属性

<ScrollView contentContainerStyle = {{flex:1}}>
    <View style={flex: 1,
        alignItems: 'center',
        justifyContent: 'center'}>
    </View>
</ScrollView>
 类似资料: