antd反应InputItem,如何更改占位符文本的颜色和fontSize?

问题描述 投票:0回答:2

antd mobile:InputItem,如何更改占位符文本的颜色和fontSize?什么属性?

这是sheetStyle:inputType:{ width:width - 70 - 15, height:34, backgroundColor:'white', marginLeft:0, marginRight:15, borderRadius:5, paddingLeft:10, paddingRight:5, }

更改占位符文本的颜色和fontSize

没有错误

ios reactjs antd
2个回答
0
投票

干得好。这应该工作。

inputType:{
        width:width - 70 - 15,
        height:34,
        backgroundColor:'white',
        marginLeft:0,
        marginRight:15,
        borderRadius:5,
        paddingLeft:10,
        paddingRight:5,
        '&::placeholder': {
            fontSize: 20,
            color: '#FF0000'
        }
    }

0
投票

占位符的Textfont与text相同。只需更改fontSize,占位符的文本fontSize将被更改。

© www.soinside.com 2019 - 2024. All rights reserved.