如何在React Native中创建文本边框 [英] How to create text border in React Native?

查看:577
本文介绍了如何在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

这篇关于如何在React Native中创建文本边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆