Css 是否可以将ExtJS文本字段中的文本居中对齐?

Css 是否可以将ExtJS文本字段中的文本居中对齐?,css,extjs,Css,Extjs,代码 name: 'intIP', fieldLabel: 'internal IP', xtype: 'textfield', readOnly: true, cls: 'cTextAlign' 风格 .cTextAlign{ text-align: right; background: red; } 这将对齐标签字段并将其涂成红色,而不是文本字段中的文本。 可以在textfield中设置文本样式吗?我认为您必须使用fieldCls而不是cls 祝你长寿、幸福!非常感谢。您

代码

name: 'intIP',
fieldLabel: 'internal IP',
xtype: 'textfield',
readOnly: true,
cls: 'cTextAlign'
风格

.cTextAlign{
    text-align: right;
    background: red;
}
这将对齐标签字段并将其涂成红色,而不是文本字段中的文本。
可以在textfield中设置文本样式吗?

我认为您必须使用
fieldCls
而不是
cls


祝你长寿、幸福!非常感谢。您也可以通过在
textfield
fieldStyle:'text align:center;'