Android borderTopLeftRadius和其他3个角半径对应项不工作
我试图绕过方形视图的拐角,但发现拐角边界半径道具不起作用。我已经尝试了这四种方法(Android borderTopLeftRadius和其他3个角半径对应项不工作,android,react-native,Android,React Native,我试图绕过方形视图的拐角,但发现拐角边界半径道具不起作用。我已经尝试了这四种方法(borderTopLeftRadius,bordertoprightraidius,borderBottomLeftRadius,borderbottomrightraidius),但都不起作用。虽然borderRadius道具工作正常。我在Mac OS上使用RN 0.12 代码片段如下所示 name ='Button' style = {{flex:1, backgroundColor:'white',borde
borderTopLeftRadius
,bordertoprightraidius
,borderBottomLeftRadius
,borderbottomrightraidius
),但都不起作用。虽然borderRadius
道具工作正常。我在Mac OS上使用RN 0.12
代码片段如下所示
name ='Button'
style = {{flex:1, backgroundColor:'white',borderBottomLeftRadius:30, borderBottomRightRadius:30, height:75,width:345 }}>
您需要添加边框宽度
style = {{flex:1, backgroundColor: 'white',borderBottomLeftRadius: 30, borderBottomRightRadius:30, height: 75,width: 345, borderWidth: 1 }}
我试过了,但除了在盒子周围加上一个黑色的边框外,它仍然没有绕过盒子的角落。我可以知道上面的代码适用的系统和RN版本信息吗?您需要在另一个
中包装,而不是在主
中包装,我相信您试图绕过主屏幕视图的一角,您的意思是我应该执行以下操作吗?测试我尝试了这个,但仍然没有圆角。我能知道你的平台是安卓吗?