sencha touch 2.3.1 自己定义图标


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了

你可能感兴趣的:(css,sencha)