我使用了 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;
}
我想要背景颜色为橙色,但我没有得到我想要的结果。
如有任何帮助,我们将不胜感激
最佳答案
您需要像下面这样应用类(需要将背景应用到表单主体):
.form .x-panel-body-default {
background-color:orange !important;
}
希望这对您有所帮助/指导。
关于css - 如何使用 CSS 设计 ExtJS 容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51656248/