【发布时间】:2020-08-15 00:28:22
【问题描述】:
我想对嵌套文本应用不同的边框半径和填充样式,但据我所知,react native 还不支持。有解决方法吗?
到目前为止我尝试的是:
<Text>
<Text
style={{
backgroundColor: 'green',
borderRadius: 12,
}}>
Text1
</Text>
<Text
style={{
backgroundColor: 'blue',
borderRadius: 12,
}}>
Text2
</Text>
</Text>
预期结果:具有不同背景和边框半径的文本。
实际结果:背景不同,但没有应用边界半径
【问题讨论】:
标签: android css react-native styles text-styling