我有一个图像,当我想使用resizeMode =“cover”使其更大时,图像的一部分被切断.如何解决? render() {return ( View style={styles.container} Image style={styles.imgStyleGoogle} source={{uri: 'my.png'}} /View )}const
render() {
return (
<View style={styles.container}>
<Image
style={styles.imgStyleGoogle}
source={{uri: 'my.png'}}
/>
<View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
marginLeft: ratio * 5,
marginRight: ratio * 5,
},
imgStyleGoogle: {
flex: 1,
height: ratio*25,
width: ratio*100,
resizeMode:'cover',
}
})
这是图片的示例:
