簡體   English   中英

在sencha touch 2中向標簽添加圖標

[英]adding icon to tabs in sencha touch 2

我已將自定義圖標設置為標簽,但它采用標簽面板的藍色,我如何獲得圖標的原始顏色。

var tabPanel = Ext.create('Ext.TabPanel',{
tabBarPosition: 'bottom',                                                   
items:[
{   
title:'General',
iconCls:'icongen',
}

我的css代碼

.icongen
{
   -webkit-mask-box-image: url("resources/images/general.png");
}
.icongen
{
   background-image: url("resources/images/general.png");
}

使用這個:)這將解決您的問題

這就是我要做的,將以下內容添加到您的CSS中:

.x-tab .x-button-icon.icongen, .x-button .x-button-icon.x-icon-mask.icongen {
-webkit-mask-image: url(<PATH TO IMAGE>);
}

iconCls一起,您可能還需要使用iconMask: true

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM