如何在React Native中创建文本边框

问题描述:

在React-Native中,如何为文本组件添加字体边框?

In React-Native, how do I add font borders to Text-components?

我尝试使用 border shadow {颜色,半径,不透明度,偏移量} ,但尚未实现。有任何建议吗?

I've tried using border and shadow{Color, Radius, Opacity, Offset}, but haven't gotten that to work. Any suggestions?

官方文档为您提供了此信息。您可以在以下站点上找到它:文本组件。那里显示了可以用来更改组件行为和样式的道具。如您所见,有一些特定的文本样式,但是您可以在查看组件。而且,如果您点击该链接,它将显示边框样式。因此,您正在寻找的可能是:

The official docs have this information for you. You can find it on this site: Text Component. There it shows which props you can use to change the behaviour and style of the component. As you can see there are some specific Text styles but also the styles you can apply on a View Component. And if you follow that link it shows you the border styles. So, what you're looking for is maybe:

borderColor string
borderTopColor string
borderRightColor string
borderBottomColor string
borderLeftColor string
borderRadius number
borderTopLeftRadius number
borderTopRightRadius number
borderBottomLeftRadius number
borderBottomRightRadius number
borderStyle enum('solid', 'dotted', 'dashed')
borderWidth number
borderTopWidth number
borderRightWidth number
borderBottomWidth number
borderLeftWidth number