如何在 react-native 中获得锐利的边缘视图?

时间:2021-04-11 17:01:22

标签: reactjs react-native canvas

是否可以使用 canvasView 在 React Native 中获得以下视图? Image

1 个答案:

答案 0 :(得分:0)

我很确定如果你使用它是可以实现的

  1. 灰色层 - 白色背景,灰色前景,带边框底部左半径

  2. 白层 - borderBottomLeftRadius BorderTopRightRadius

  3. 另一个带有borderTopRightRadius的图层

灰色层示例

<View style={{ backgroundColor: '#FFF', height: 20 }}>
    <View style={{ backgroundColor: "grey", borderBottomLeftRadius: '20%'}}>
        content
    </View>
</View>

您只需要处理背景颜色、borderColor 和 borderradius 等。尽管它看起来可能与您想要的不完全相同。并且可能在不同设备上显示不同