【发布时间】:2022-01-11 21:25:48
【问题描述】:
我想使用视图创建一个 V 形,但是我不确定这是否超出了视图的范围。
我尝试使用如下所示的边框半径,但这只会使视图变圆。
import React, { Component } from 'react'
import { View, Text } from 'react-native'
export class Chevron extends Component {
render() {
return (
<View
style={{
backgroundColor: "blue",
borderTopRightRadius:90,
borderBottomRightRadius:90,
borderTopLeftRadius:-90,
borderBottomLeftRadius:-90,
}}
>
<Text>{this.props.item}</Text>
</View>
)
}
}
export default Chevron
【问题讨论】:
标签: react-native frontend