React Native打破了边界

时间:2018-03-02 17:39:52

标签: css reactjs react-native border

我正在为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 个答案:

答案 0 :(得分:0)

能够通过向captureSqaure添加4 <View />并为其提供以下属性来实现此目的:

&#13;
&#13;
  topLeftEdge: {
    position: 'absolute',
    top: 0,
    left: 0,
    height: 25,
    width: 25,
    borderColor: '#FFFFFF,
    borderLeftWidth: 3,
    borderTopWidth: 3,
  },
&#13;
&#13;
&#13;