【发布时间】:2019-11-19 06:06:38
【问题描述】:
文本在 ANDROID 中出现/显示,但在 IOS 中没有。只有出现/显示的图像。
<Block center>
<Block middle>
<Image source={Images.LogoOnboarding} style={styles.logo} />
<Text color="black" size={10} style={{ textAlign: "center", width: 200, position: 'relative'}} >
Take control of what your kids watch on the internet.{"\n"}{"\n"}
Discover kid-friendly channels for your kids.{"\n"}
Choose only the creators that make family- friendly videos.</Text>
<Image source={Images.LogoOnboarding2} style={styles.logo2} />
</Block>
</Block>
这是我的风格代码:
logo: {
width: 100,
height: 100,
zIndex: 2,
position: 'relative',
marginTop: '-50%'
},
logo2: {
width: 400,
height: 40,
zIndex: 2,
position: 'absolute',
resizeMode: 'contain',
marginBottom: 50
}
【问题讨论】:
-
尝试 Platform.ios 并发现任何变化
标签: reactjs react-native react-native-android expo