我使用本机基地输入组件 https://docs.nativebase.io/Components.html#Form,我尝试像下面的示例一样自定义占位符字体样式,但它不会更改占位符。它改变了用户键入的输入值的样式。如何更改占位符字体样式?
<Input
style={{color:"blue", fontFamily:"Arial"}}
placeholder="I am blue and Arial font"
/>
Update
我已经尝试过了placeholderStyle
就像下面的例子一样,但它不起作用。
<Input
placeholderStyle={{color:"blue", fontFamily:"Arial"}}
placeholder="I am blue and Arial font"
/>
文本输入和占位符的字体系列是相同的,但是我假设您的意思是占位符的颜色没有改变,这是解决方案。
Do this:
<Input
style={{color:"blue", fontFamily:"Arial"}}
placeholderTextColor="blue"
placeholder="I am blue and Arial font"
/>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)