RN中 打开Image/ImageBackground圆角的正确方式

这个在IOS中实测有时可用但不万能,在安卓中就不尽人意了,最终在github上rn板块找到解决办法,设置隐藏属性imageStyle={{ borderRadius:20 }}

<Image style={{width:40,height:40,borderRadius:20}} imageStyle={{borderRadius:20}} />
<ImageBackground style={{width:40,height:40,borderRadius:20}} imageStyle={{borderRadius:20}} />

猜你喜欢

转载自blog.csdn.net/wangqiuwei07/article/details/82770945
RN