2013-08-24 329 views
0

我正在使用primefaces mobile(v 0.9.5-snapshot)附帶的jquery-mobile(v1.3.1)。當我嘗試添加圖標時,我總是看到屬性「data-icon」中提到的名稱將出現,如下圖所示。如何擺脫它?數據圖標顯示不正確

<a id="menuSwitcher" href="javascript:void(0)" data-role="button" data-iconpos="left" data-icon="back" onclick="WBUI.menuToggler($(this))" class="ui-btn-left ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-left ui-btn-hover-a ui-btn-up-a" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="a" original-title=""> <span class="ui-btn-inner" original-title="">ToolBox</span></a> 

enter image description here

回答

0

發現該默認icomoon CSS腳本(因爲我用它爲其它圖標)有如下數據屬性,我需要刪除,以避免重複渲染。

/* Use the following CSS code if you want to use data attributes for inserting your icons */ 
[data-icon]:before 
{ 
    font-family: 'icomoon'; 
    content: attr(data-icon); 
    speak: none; 
    font-weight: normal; 
    font-variant: normal; 
    text-transform: none; 
    line-height: 1; 
    -webkit-font-smoothing: antialiased; 
}