【发布时间】:2021-01-20 18:03:09
【问题描述】:
我正在使用Expo iOS模拟器,一直在尝试让后台全屏,但无法正常工作。
export default function App() {
return (
<ScrollView >
<View style={[styles.container]}>
<Text style={styles.title}>Mt. Fuji</Text>
<Image source={require('./images/pic.jpeg')} style={styles.uriImg}/>
<TextImg imageUri={'https://m.media-amazon.com/images/M/MV5BZjRjOTFkOTktZWUzMi00YzMyLThkMmYtMjEwNmQyNzliYTNmXkEyXkFqcGdeQXVyNzQ1ODk3MTQ@._V1_.jpg'} text='Rick & Morty' style={[styles.text, styles.propImg]} />
<TextImg text='The Butterfly Nebula' imageUri={'https://www.dualdove.com/wp-content/uploads/2020/02/supernova-dying-star-in-the-shape-of-a-butterfly.jpg'} style={[styles.text, styles.propImg]} />
</View>
</ScrollView>
)
};
const styles = StyleSheet.create({
uriImg: {
width: 350,
height: 200,
top:110,
},
propImg: {
width: 350,
height: 200
},
container:{
backgroundColor: '#a1c5ff',
alignItems: 'center',
flex:1
});
这就是现在的样子。
【问题讨论】:
标签: css ios reactjs react-native react-props