React Native 中视图的倒边框半径 [英] Inverted Border Radius of View in React Native

查看:43
本文介绍了React Native 中视图的倒边框半径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 react native 中搜索与倒边框半径相关的很多内容,但没有找到任何东西.请在图片下方找到以供参考.

I tried to search lot related to inverted border radius for view in react native but not find anything. Please find below the image for reference.

推荐答案

尝试使用 2 个视图,一个包裹在另一个视图下并实现相同的效果,因为 react native 中仍然不支持倒置边框半径.查看更新的 EXPO 链接以获取详细信息.世博链接

Try using 2 Views, one wrapped under another and achieve the same, Because inverted borderradius is still not supported in react native. Check the updated EXPO link for detailed view. Expo link

<View>
    <View
      style={{
        width: 100,
        height: 100,
        backgroundColor: 'black',
        alignItems: 'center',
        justifyContent: 'flex-start',
      }}>
      <View
        style={{
          backgroundColor: 'white',
          height: 50,
          width: 50,
          alignSelf: 'flex-start',
          borderBottomRightRadius: 50,
        }}
      />
    </View>
  </View>

这篇关于React Native 中视图的倒边框半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆