【发布时间】:2020-02-15 08:45:12
【问题描述】:
如何在 react-native 中组合多个内联样式对象和内联 css?
它有 3 个样式对象 TimelineGreenColor、TimelineLeftBorder、TimelineLeftLine 用于视图 div
const stylesB = StyleSheet.create( {
TimelineGreenColor:
{
backgroundColor: "green",
},
TimelineLeftBorder:
{
position: 'absolute',
width: 4,
backgroundColor: "green",
height: '100%',
left: 4,
top: 15,
},
TimelineLeftCircle:
{
position: 'absolute',
width: 12,
height: 12,
backgroundColor: "green",
top: 12,
borderRadius: 50,
left: 0,
/*boxShadow: "0px 0px 10px -2px black",*/
},
TimelineLeftLine:
{
position: 'absolute',
width: 15,
height: 3,
backgroundColor: "green",
top: 16,
left: 5,
}
<View style={how to write styles in react-native ??????????}></View>
【问题讨论】:
标签: android css react-native styles stylesheet