如何使用CSS设计ExtJS容器?
我使用了如何使用CSS设计ExtJS容器?,css,extjs5,cls,Css,Extjs5,Cls,我使用了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: [{
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'
}]
});
.form {
background-color:orange !important;
}
现在CSS:
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'
}]
});
.form {
background-color:orange !important;
}
我想得到背景色橙色,但我没有得到我想要的结果
任何帮助都将不胜感激您需要像下面这样应用类(需要将背景应用于表单正文):
希望这将对您有所帮助/指导。您需要像下面这样应用类(需要将背景应用于表单正文):
希望这将对您有所帮助/指导。您可以将类似的css添加到面板配置中 比如
bodyStyle:'背景:橙色!面板中的重要“,
Ext.create('Ext.form.Panel',{
renderTo:document.body,
标题:“用户表单”
高度:350,
宽度:300,
cls:'form',
bodyStyle:“背景:橙色!重要”
bodyPadding:10,
defaultType:'textfield',
您可以将类似的css添加到面板配置中 如面板中的
bodyStyle:“背景:橙色!重要”
Ext.create('Ext.form.Panel',{
renderTo:document.body,
标题:“用户表单”
高度:350,
宽度:300,
cls:'form',
bodyStyle:“背景:橙色!重要”
bodyPadding:10,
defaultType:'textfield',
非常感谢您的回答@rohit。但是有一件事您如何获得或识别.x-panel-body-default。我的意思是您如何获得默认的ExtJS默认CSS类。非常感谢您的回答@rohit。但是有一件事您如何获得或识别.x-panel-body-default。我的意思是如何获得或识别.x-panel-body-defaultl您将获得默认的ExtJS默认CSS类。