React-Native学习之 图片做背景 modal 点击其他区域消失

前端之家收集整理的这篇文章主要介绍了React-Native学习之 图片做背景 modal 点击其他区域消失前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.modal点击其他区域消失
<TouchableWithoutFeedback
    onPress={()=>this.setState({showTopMenu:false})}>
    <View style={{position: 'absolute',left: @H_301_44@0,right: @H_301_44@0,top: @H_301_44@0,bottom: @H_301_44@0,width: null,}}/>
</TouchableWithoutFeedback>


2.图片做背景
 
 
<Image  style={styles.img}
    source={require('../image/IMG_0026.jpg')}
    resizeMode='cover' />
 
 
 
 
img: {
    position: 'absolute', left: @H_301_44@0, right: @H_301_44@0, top: @H_301_44@0, bottom: @H_301_44@0, height: null, width: null,},

猜你在找的React相关文章