1

我需要创建一个类似于KitchenSink经典主题)示例的标题:

KitchenSink 样品头

我如何学习它的 CSS 和用法?

4

2 回答 2

1

它是一个自定义元素,扩展了非常通用的 Ext.Container:

Ext.define("KitchenSink.view.Header", {
    extend: Ext.Container,
    xtype: "appHeader",
    id: "app-header",
    height: 52,
    layout: {type: "hbox",align: "middle"},
    initComponent: function() {
        this.items = [{xtype: "component",id: "app-header-title",html: "Ext JS Kitchen Sink",flex: 1}];
        if (!Ext.getCmp("options-toolbar")) {
            this.items.push({xtype: "themeSwitcher"})
        }
        this.callParent()
    }
});

它的大部分样式都发生在自定义 CSS 中。请参阅 CSS 以获取#app-header-title.

于 2013-03-25T22:20:57.073 回答
-1

这是学习 ExtJS 的一个棘手部分。我使用带有 chrome 的“Inspect Element”(右键单击 chrome 中的标题并转到 Inspect Element)来确定我需要覆盖的 CSS 类以及我需要在哪里设置 'cls' 属性。

于 2013-03-25T22:01:42.930 回答