【发布时间】:2021-01-15 14:14:40
【问题描述】:
我一直在尝试学习 extjs 中的样式,但我不知道它是如何工作的。在一个非常简单的示例中,我想将一些样式应用于面板标题:
app.js
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.panel.Panel', {
title: 'MyPanel',
cls: 'title',
renderTo: Ext.getBody(),
items: [{
xtype: 'button',
text: 'myButton'
}, {
html: 'Hello World!!!',
}]
})
}
});
所以,根据documentation,我设法使用以下css文件更改标题background-color:
app.css
.title .x-panel-header {
background-color: pink;
color: red; /* this doesn't work */
font-size: 22px; /* this doesn't work */
}
问题是一些主题变量没有正确应用 - 例如,文本颜色或字体大小,尽管这些变量是根据面板标题的文档指定的。我错过了什么?
【问题讨论】: