Ari*_*jee 0 themes sencha-touch sencha-touch-2
在我的应用程序中,我试图改变标题的颜色.为此,我在app.scss文件中添加了一些主题.我可以更改标题栏的背景颜色.但标题的颜色并没有改变.我的app.scss文件是这样的:
$base-color: #588aad; // go big blue!$include_default_icons: false;
@import 'sencha-touch/default/all';
@include sencha-panel;
@include sencha-buttons;
@include sencha-sheet;
@include sencha-picker;
@include sencha-tabs;
@include sencha-toolbar;
@include sencha-toolbar-forms;
@include sencha-indexbar;
@include sencha-list;
@include sencha-layout;
@include sencha-form;
@include sencha-msgbox;
@include sencha-loading-spinner;
@include pictos-iconmask("bookmarks");
@include pictos-iconmask("compose");
@include pictos-iconmask("trash");
@include pictos-iconmask("search");
@include pictos-iconmask("bookmark2");
@include sencha-toolbar-ui('blue', #EEEEEE,'matte');
.x-toolbar .x-toolbar-title {
color: #5a3d23;
}
Run Code Online (Sandbox Code Playgroud)
这是我的面板代码:
Ext.define('MyApp.view.TitlePanel', {
extend: 'Ext.Panel',
config: {
modal: false,
items: [
{
xtype: 'titlebar',
docked: 'top',
height: 120,
ui: 'blue',
title: 'Teritree Bussiness Portal',
items: [
{
xtype: 'image',
docked: 'left',
height: 118,
width: 202,
src: 'resources/images/Logo.PNG'
}
]
}
]
}
});
Run Code Online (Sandbox Code Playgroud)
可以任何人请帮忙??? 提前致谢..
使用Firebug或Safari(或Chrome)检查器来了解div如何嵌入DOM中.
如果我检查标题栏的标题,这就是我所拥有的
您可以看到一个my-titlebar包含类的div,其中包含另一个类x-title.如果你在右边看,你会发现颜色属性是由x-titleCSS类携带的.因此,您需要覆盖此类,而不是将颜色属性添加到另一个类.

所以这就是你应该做的:
在标题栏中添加cls属性
xtype: 'titlebar',
cls:'my-titlebar',
docked: 'top',
height: 120,
Run Code Online (Sandbox Code Playgroud)
写CSS
.my-titlebar .x-title{
color:white;
}
Run Code Online (Sandbox Code Playgroud)
在这里你去:

最后的建议,你应该!important只在你别无选择时使用.否则没有意义.
希望这可以帮助
| 归档时间: |
|
| 查看次数: |
11264 次 |
| 最近记录: |