我正在尝试在一侧添加虚线边框,
{
height: '100%',
width: 20,
position: 'absolute',
borderRadius : 1,
borderStyle: 'dashed',
borderRightWidth: 1,
borderRightColor: 'rgba(161,155,183,1)'
}
这个不起作用,但当我将它更改为
{
height: '100%',
width: 20,
position: 'absolute',
borderRadius : 1,
borderStyle: 'dashed',
borderWidth: 1,
borderColor: 'rgba(161,155,183,1)'
}
代码可以正常运行,但是四周都有边框。我该如何在一个方向上添加虚线边框?同时,是否有方法可以增加虚线之间的间距?
"react-native": "0.57.7"
borderStyle
应用于单个边框在 React Native 0.63.2 中存在问题,但有一个开放的 PR 来解决这个限制:https://github.com/facebook/react-native/pull/29099 - Joshua Pinter