我使用了cls
、bodyCls
、componentCls
的ExtJS
属性,但没有得到结果。
例如:的
Ext.create('Ext.form.Panel', {
renderTo: document.body,
title: 'User Form',
height: 350,
width: 300,
cls: 'form',
bodyPadding: 10,
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'firstName'
}, {
fieldLabel: 'Last Name',
name: 'lastName'
}, {
xtype: 'datefield',
fieldLabel: 'Date of Birth',
name: 'birthDate'
}]
});
现在CSS:
.form {
background-color:orange !important;
}
我想得到橙色的背景,但我没有得到我想要的结果。
如有任何帮助,我将不胜感激。
发布于 2018-08-04 20:58:11
您需要应用如下所示的类(需要在表单正文中应用背景):
.form .x-panel-body-default {
background-color:orange !important;
}
希望这篇文章能对你有所帮助。
发布于 2018-08-14 13:34:49
您可以像这样将css添加到Panel配置中,
就像你面板中的bodyStyle: 'background: orange !important',
Ext.create('Ext.form.Panel', {
renderTo: document.body,
title: 'User Form',
height: 350,
width: 300,
cls: 'form',
bodyStyle: 'background: orange !important',
bodyPadding: 10,
defaultType: 'textfield',
https://stackoverflow.com/questions/51656248
复制相似问题