【发布时间】:2021-12-10 20:49:28
【问题描述】:
'我的问题是关于 react native' “我正在尝试更改颜色和字体大小 Hello、world 和 Hello,但它没有改变,代码运行良好。” '''
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text style={[styles.Red,styles.One]}>Praveen</Text>
<Text Style={[styles.White,styles.Two]}>
Hello, World
</Text>
<Text H1>Hello</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFFFFF',
alignItems: 'center',
justifyContent: 'center',
},
Red: {
color: '#F44336'
},
One: {
fontSize : 80
},
White: {
color : '#F44336'
},
Two: {
fontSize : 80
},
});
'''
【问题讨论】:
-
请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。
标签: html css reactjs react-native