10 |
IconFont 图标
11 |
12 |
13 | -
14 |
15 |
新浪
16 | 
17 |
18 |
19 | -
20 |
21 |
QQ
22 | 
23 |
24 |
25 | -
26 |
27 |
微信
28 | 
29 |
30 |
31 | -
32 |
33 |
facebook
34 | 
35 |
36 |
37 | -
38 |
39 |
twitter
40 | 
41 |
42 |
43 |
44 |
45 |
46 |
47 | 第一步:使用font-face声明字体
48 |
49 | @font-face {font-family: 'iconfont';
50 | src: url('iconfont.eot'); /* IE9*/
51 | src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
52 | url('iconfont.woff') format('woff'), /* chrome、firefox */
53 | url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
54 | url('iconfont.svg#uxiconfont') format('svg'); /* iOS 4.1- */
55 | }
56 |
57 | 第二步:定义使用iconfont的样式
58 |
59 | .iconfont{
60 | font-family:"iconfont" !important;
61 | font-size:16px;font-style:normal;
62 | -webkit-font-smoothing: antialiased;
63 | -webkit-text-stroke-width: 0.2px;
64 | -moz-osx-font-smoothing: grayscale;}
65 |
66 | 第三步:挑选相应图标并获取字体编码,应用于页面
67 |
68 | <i class="iconfont">3</i>
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iconpark",
3 | "version": "0.0.1",
4 | "description": "Collection of iconfonts",
5 | "main": "index.js",
6 | "author": "lvwzhen",
7 | "license": "MIT",
8 | "repository": {
9 | "type": "git",
10 | "url": "https://github.com/lvwzhen/iconpark.git"
11 | },
12 | "bugs": {
13 | "url": "https://github.com/lvwzhen/iconpark/issues"
14 | },
15 | "keywords": [
16 | "icon",
17 | "iconfont",
18 | "css"
19 | ],
20 | "dependencies":{
21 | "optimist": "*",
22 | "swig": "*",
23 | "consoler": "*"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------