how to change background color of all panels and containers of sencha touch 2 app

╄→尐↘猪︶ㄣ 提交于 2019-12-11 20:34:27

问题


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.


回答1:


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;
}



回答2:


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}


来源:https://stackoverflow.com/questions/15083690/how-to-change-background-color-of-all-panels-and-containers-of-sencha-touch-2-ap

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