sencha touch 2.3.1 自己定义图标

本文档详细介绍了如何使用Sencha Touch为应用添加自定义图标的过程。通过访问icomoon.io生成所需的字体图标,并将这些图标整合到Sencha应用中。文章提供了具体的步骤说明和代码示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


E文好的请看下面文档

http://docs.sencha.com/touch/2.3.1/#!/guide/theming

Adding Your Own Icons to Your Application

E 文不好的人 当然也要看上面的文档,如果安装文档的方法做,你会发现,无论如何也无法通过sencha app build 老是include the webfont file into this Sass file using the @include icon-font mixin statement. Once downloaded, incorporate the font file into your Compass files using the @font-face mixin 错误



解决 方法就是,http://stackoverflow.com/questions/16985226/icomoon-not-loading-properly/16998639#16998639  

 1)https://icomoon.io/app/#/select/font 到此神站,选择你需要的图标,或者上传你的图标,生成font形式,解压到

{sencha app}\resources\sass\stylesheets\fonts\pictos

2)

编辑 sass 目录下的 app.css文件


// The following two lines import the default Sencha Touch theme. If you are building
// a new theme, remove them and the add your own CSS on top of the base CSS (which
// is already included in your app.json file).
@import 'sencha-touch/default';
@import 'sencha-touch/default/all';


// Custom code goes here..


// Examples of using the icon mixin:
// @include icon('user');






//@include pictos-iconmask('check2');


@include icon-font("icomoon",inline-font-files(
"pictos/icomoon.woff",woff,
"pictos/icomoon.ttf",truetype,
"pictos/icomoon.svg",svg
));
@include icon('icon-coin', '\e600', 'icomoon');
@include icon('icon-location', '\e601', 'icomoon');
@include icon('icon-stats', '\e602', 'icomoon');
@include icon('icon-rocket', '\e603', 'icomoon');
@include icon('icon-news', '\e604', 'icomoon');
@include icon('icon-mail', '\e605', 'icomoon');

build 就Ok了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值