css - 如何使用 CSS 设计 ExtJS 容器?

标签 css extjs5 cls

我使用了 clsbodyClscomponentClsExtJS 属性,但没有得到结果。

举个例子:

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;
}

Working Fiddle

希望这对您有所帮助/指导。

关于css - 如何使用 CSS 设计 ExtJS 容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51656248/

相关文章:

html - 在选择下拉菜单中删除蓝色背景 IE9

java - Spring MVC : recieving object with empty attributes in a post Method using @RequestBody

extjs - EXT JS 5.1 Minified Core Frame work 开发时

seo - CLS 网络核心重要值(value)观让我发疯

php - Twitter Bootstrap 导航栏 - 表单输入之间的空间

css - Flexbox,方形 div 的响应式网格保持纵横比

javascript - ajax请求 - 更新没有表单的记录

Adsense "Auto Ads"强制 CLS 布局移位

windows - 在scala中清除(在cmd中运行的scala程序中调用cls)

html - 如何在文本上方制作带有图标的按钮