【发布时间】:2021-07-29 18:25:17
【问题描述】:
【问题讨论】:
-
在这里结帐可能会有所帮助you
-
谢谢,我看到了,但不适合我
标签: reactjs react-native jsx
【问题讨论】:
标签: reactjs react-native jsx
<View style={{ flex: 1, paddingTop: 50, backgroundColor: 'orange' }}>
<View style={{
height: 300,
width: "100%",
backgroundColor: 'red'
}}/>
<View
style={{
height: 300,
width: 300,
borderRadius: 150,
backgroundColor: 'white',
bottom: 300
}}
/>
</View>
View 作为一个白色圆圈并使用绝对位置,您可以通过使用红色矩形View 来定位它,白色的位于红色的顶部(但这里是屏幕其余部分的外观非常重要 <Svg style={{
height: '100%',
width: '100%',
backgroundColor: 'red'
}}>
<Path
stroke={2}
fill={'white'}
d={'M 100 126 l -101 -1 l 0 100 l -1 -2 l 1 2 q 13 -88 103 -99'}
/>
</Svg>
【讨论】:
M 100 126 您可以将弯曲的三角形移动到任何您想要的地方
实现这一点的最佳方法是圆形视图而不是方形视图。
【讨论】: