我在设计react原生元素卡时遇到了一些困难,我想知道是否有人能告诉我设计卡左边框的最佳方法。我试过使用borderLeftColor,但不起作用。只有borderTopColor和borderBottomColor可以工作。感谢
const DeviceInputItems = (props) => {
return (
<Card
containerStyle={{
padding: 0,
margin: 5,
borderLeftColor: "red",
borderWidth: 4,
}}
key={props.key}
>
<View style={styles.container}>
<Text style={styles.centerText}>
Hello
</Text>
</View>
</Card>
onst styles = StyleSheet.create({
centerText: {
textAlign: "left",
},
container: {
flexDirection: "row",
flex: 1,
},
不幸的是,这是React Native问题
borderColor(左上右下(样式在Android上被忽略#19981