【问题标题】:React Native broken up borderReact Native 打破边界
【发布时间】:2018-03-02 17:39:52
【问题描述】:

我正在为 React-Native 寻找一些样式指导。我想创建一个只有一定数量的角着色的边框。像这样的东西:

我目前有这个:

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

我不知道如何打破边界。有什么想法吗?

【问题讨论】:

标签: css reactjs react-native border


【解决方案1】:

能够通过将 4 个<View />s 添加到 captureSqaure 并赋予它们以下属性来做到这一点:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-16
    • 1970-01-01
    • 1970-01-01
    • 2021-08-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多