如何在 Ext.window 中插入新的 div

How to insert a new div in Ext.window

我需要创建一个新的 div 来包装现有的 ExtJS。我的目标是为这个新 div 插入一个 CSS 属性 (背景图像)。这是场景:

<!-- First div is ExtJS made-->
<div class="x-window">

    <!-- I want to create this one to wrap image inserted div below! -->
    <div class="newOne" style="text-align: center;">

        <!-- This div is ExtJS made as well! -->
        <div class="x-window-header" style="background-image: url('Icon.png');></div>

    </div>

</div>

我使用了上面的 div,它是 ExtJS 制作的 x-window 的名称,但它没有应用 text-align: center; 属性。我试过在同一个 x-window-header div 元素内对齐居中,但它也没有应用!

非ExtJS制作的方法是什么div?

您可以更改 Ext.window.Window 'renderTpl' 属性。

如果你想添加 css 使用 cls confid 和 giv class name.

如果您想在 header 中添加图像,请执行以下操作:-

第一步:-

'cls':'className'

第二步:- 在您的 css 文件中

.className .x-window-header{
   background-image: url(...);
}