Sencha touch + WP8 + Cordova - 图标字体未显示 - 解决方法 [英] Sencha touch + WP8 + Cordova - icon font not shown - Workaround

查看:198
本文介绍了Sencha touch + WP8 + Cordova - 图标字体未显示 - 解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最新的sencha touch使用网络字体作为图标,但WP8对网络字体有一些限制,请参阅在Phonegap Windows Phone 8应用程序中使用css font-face

解决方案

花了1天后,我发现了简单的解决方法。因为sencha触摸有不同的css为win和android我们下一步做。
到我们所有的图标我添加类win

  {
align:'left',
name:'nav_btn',
iconCls:'list win',
ui:'plain'
},

然后在win.scss(或css它不重要)

 。 list.win {
background-image:url('data:image / png; base64,BASE64ICON');
}

但在这种情况下它会显示内容字母以修复它

  .x-tab .x-button-icon.list.win:before,
.x-button .x-button -icon.list.win:before,
.x-tab .x-button-icon.settings.win:before,
.x-button .x-button-icon.settings.win:before {
content:none;
}

这不是最好的解决方案, p>

Latest sencha touch is using webfonts for icons but WP8 has some limitation with web fonts see Using css font-face in a Phonegap Windows Phone 8 app

解决方案

After spending 1 day i just found simple workaround. Since sencha touch has different css for win and android we are doing next. To all our icons i am adding class win

{
                        align: 'left',
                        name: 'nav_btn',
                        iconCls: 'list win',
                        ui: 'plain'
                    },

Then in win.scss (or css it doesnot matter )

.list.win {
  background-image: url('data:image/png;base64,BASE64ICON');
}

but in that case it will show content letter so to fix it

.x-tab .x-button-icon.list.win:before,
.x-button .x-button-icon.list.win:before,
.x-tab .x-button-icon.settings.win:before,
.x-button .x-button-icon.settings.win:before{
  content: none;
}

Its not the best solution but not its just fixed my problem..

这篇关于Sencha touch + WP8 + Cordova - 图标字体未显示 - 解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆