React Native破碎的边框

3
我正在寻找React-Native的样式指导。我想创建一个只有特定角落有颜色边框的效果,类似这样: enter image description here 目前我的效果是这样的: enter image description here

  captureSquare: {
    height: 450,
    width: 450,
    borderWidth: 2,
    borderColor: '#FFFFFF,
    backgroundColor: 'transparent',
    justifyContent: 'center',
    alignItems: 'center',
  },

我不确定如何打破边框。有什么想法吗?


1
我认为可以使用CSS的border-image来实现这一点,但我无法弄清楚如何做到! - Tom Fenech
可能是CSS-仅显示角边框的重复问题。 - Tom Fenech
1个回答

1
通过在captureSquare中添加4个

1
你知道如何在这里给角落设置半径吗? - Ajay S
@AjayS 我不是100%确定,但你可能可以添加 borderTopLeftRadiusborderTopRightRadiusborderTopEndRadiusborderTopStartRadius 或者任何你想要添加半径的角落。 - StuffedPoblano

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接