1. 程式人生 > >sencha touch 2.3.1 自己定義圖示

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了

相關推薦

no