Luc*_*irl 7 image react-native
我有一个图像,当我想使用resizeMode ="cover"使其更大时,图像的一部分被切断.如何解决?
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',
}
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5904 次 |
| 最近记录: |