How to Give a Overlay Panel in sencha touch a transparent background

别等时光非礼了梦想. 提交于 2019-12-06 11:34:21

You need to change the x-panel-inner cls for your panel when it is centered. So what you want to do is give your panel a cls e.g: cls: my-panel.

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

Now in your custom stylesheet:

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

So now your centered panel should have its background transparent.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!