一个简短的问题。
有没有办法在react-native中集中文本Textinput
?
这是 jsx 中的标记:
<TextInput style={styles.input} placeholder="Your Account" />
在 styles.input 中,只需尝试添加textAlign:"center"
,它不起作用。
与将alignAlign 作为属性添加到标记中相同。
有人可以帮我一个忙吗?谢谢。
您应该使用 inputText 属性将文本对齐到中心,如下所示
textAlign={'center'}
它看起来像
<TextInput style={styles.input} textAlign={'center'} placeholder="Your Account" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)