【发布时间】:2019-10-16 14:02:10
【问题描述】:
我想在 React Native 中更改部分 Text 的样式。
我试过了:
<Text style={styles.parent}>
Dernier message : <Text style={[styles.children, {
color: 'red',
paddingLeft: 10,
borderWidth: 5,
borderColor: 'black',
}]}>Coucou</Text>
</Text>
const styles = StyleSheet.create({
parent: {
backgroundColor: 'yellow',
},
children: {
backgroundColor: 'blue',
},
})
- 父背景颜色已更改 - 好
- 儿童颜色和背景颜色已更改 - 好
- 儿童向左填充且边框未更改
你能帮帮我吗?谢谢
【问题讨论】:
标签: reactjs react-native