【发布时间】:2018-06-11 19:05:25
【问题描述】:
我正在开发一个示例应用程序,在此应用程序中需要使用箭头卡,它用于提供显示卡。 我尝试了基于 react-native 形状,但我没有得到输出。
假设如果提供的文本自动增加,箭头设计形状也会增加
这是我的代码:
<View style={styles.container}>
<View style={{ flex: 0.1, backgroundColor: "blue" }} />
<View
style={{
flex: 0.9,
backgroundColor: "green",
justifyContent: "center",
alignItems: "center"
}}
>
<View style={styles.baseTop} />
<View style={styles.baseBottom} />
</View>
</View>
baseTop: {
borderBottomWidth: 35,
borderBottomColor: "red",
borderLeftWidth: 50,
borderLeftColor: "transparent",
borderRightWidth: 50,
borderRightColor: "transparent",
height: 0,
width: 0,
left: 0,
top: -35,
position: "absolute"
},
baseBottom: {
backgroundColor: "red",
height: 55,
width: 100
}
这个我需要像这种类型的图片,这里是引用图片:
【问题讨论】:
-
我建议您在问题中添加“css”标签。
标签: css react-native react-native-android react-native-ios