how to change background color of all panels and c

2019-09-03 04:40发布

I am trying to change theme of sencha application, i want to know how to change background color of all panels and containers of sencha touch app like touchstyle application

I changed the title bar, tab panel color, but i don't know how to change the color of panel and container.

2条回答
SAY GOODBYE
2楼-- · 2019-09-03 05:01

Two ways:

First(Directly change in panel):

new Ext.Panel({
    width:200,
    height:200,
    bodyStyle:{"background-color":"red"}, 
    renderTo: document.body
});

Second(Add CSS class and use it in Panel's 'bodyCssClass' property):

.x-panel-body{
background-color: blue}
查看更多
够拽才男人
3楼-- · 2019-09-03 05:05

Set the style config.

style: {
    background: 'red'
}

EDIT: You could set the cls config for your panel. E.g: cls: red-bg and in your stylesheet:

.red-bg .x-panel-body{
    background-color : red !important;
}
查看更多
登录 后发表回答