【发布时间】:2019-10-20 15:43:58
【问题描述】:
React Native 中需要答案。
<View>
<View className="parent1">
<Text>hello with green</Text>
</View>
<View>
<Text>hello with default color</Text>
</View>
</View>
现在我想添加 CSS 到 Text 有一个 parent 其 classname 是 parent1 在 React Native 中。
【问题讨论】:
-
哪个子类,你能解释一下吗?
-
文本组件,其父级为parent1
-
你不能,react-native 在样式继承方面真的很有限。参考这篇文章:medium.com/@fullsour/…
标签: reactjs react-native css-selectors stylesheet styling