width null在react-native中表示什么?
发布时间:2020-12-15 20:48:12 所属栏目:百科 来源:网络整理
导读:我在SO和几个应用程序上遇到了几个问题,我遇到了以下样式配置: – container: { flex:1,width: null,}, 我想知道width:null在这里是什么用途.有人可以帮忙吗? Image source={require('./images/MacWallPaper.jpg')} style={styles.container}/Image 如果
我在SO和几个应用程序上遇到了几个问题,我遇到了以下样式配置: –
container: { flex:1,width: null,}, 我想知道width:null在这里是什么用途.有人可以帮忙吗? <Image source={require('./images/MacWallPaper.jpg')} style={styles.container}> </Image> 如果未指定width:null和height:null组件,则获取源图像的??实际宽度和高度. container: { flex: 1,justifyContent: 'center',alignItems: 'center',backgroundColor: 'rgba(0,0)',} 当您明确指定width:null和height:null组件时,不会使用图像的实际宽度和高度. container: { flex: 1,// remove width and height to override fixed static size width: null,height: null,} 观看this视频 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |