2

以下のコードは、パネルの周囲の境界線の色のみを変更し、パネル自体は変更しません。

var overlay = Ext.Viewport.add({                
    xtype: 'panel',
    centered: true,
    style:'background-color: transparent;',
    modal: {
        style: 'opacity: 0'
    },
    hideOnMaskTap:true,
    width:'20%',
    height: '50%',
    styleHtmlContent:true,
    items:[{
        xtype:'button',
        test:'hey',
        cls:'notrans',
        style: 'opacity: 1'
    }]
});             
4

1 に答える 1

5

パネルが中央x-panel-innerに配置されている場合は、パネルのclを変更する必要があります。したがって、実行したいのは、パネルに例を与えることです。clscls: my-panel

var overlay = Ext.Viewport.add({
    xtype: 'panel',
    centered: true,
    style:'background-color: transparent;',
    cls: 'my-panel',
    ....
});             

今あなたのカスタムスタイルシートに:

.my-panel .x-panel-inner {
    background-color: transparent !important;
}

これで、中央に配置されたパネルの背景が透明になります。

于 2013-03-17T02:37:58.427 に答える