demo.html
7.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>IconFont</title>
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css">
</head>
<body>
<div class="main">
<h1>IconFont 图标</h1>
<ul class="icon_lists clear">
<li>
<i class="icon iconfont"></i>
<div class="name">more</div>
<div class="code">&#xe618;</div>
<div class="fontclass">.more</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">三角2</div>
<div class="code">&#xe612;</div>
<div class="fontclass">.sanjiao2</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">三角1</div>
<div class="code">&#xe613;</div>
<div class="fontclass">.sanjiao1</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">up</div>
<div class="code">&#xe615;</div>
<div class="fontclass">.up</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">down</div>
<div class="code">&#xe616;</div>
<div class="fontclass">.down</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">share</div>
<div class="code">&#xe600;</div>
<div class="fontclass">.yoho-share</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">good</div>
<div class="code">&#xe601;</div>
<div class="fontclass">.yoho-good</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">view</div>
<div class="code">&#xe602;</div>
<div class="fontclass">.yoho-view</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">time</div>
<div class="code">&#xe603;</div>
<div class="fontclass">.yoho-time</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">enter</div>
<div class="code">&#xe604;</div>
<div class="fontclass">.yoho-enter</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">like</div>
<div class="code">&#xe605;</div>
<div class="fontclass">.yoho-like</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">arrow-down</div>
<div class="code">&#xe607;</div>
<div class="fontclass">.enter</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">up</div>
<div class="code">&#xe608;</div>
<div class="fontclass">.up1</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">down</div>
<div class="code">&#xe609;</div>
<div class="fontclass">.downn</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">gou</div>
<div class="code">&#xe60a;</div>
<div class="fontclass">.gou</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">前进</div>
<div class="code">&#xe614;</div>
<div class="fontclass">.qianjin</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">back</div>
<div class="code">&#xe610;</div>
<div class="fontclass">.back</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">search</div>
<div class="code">&#xe60f;</div>
<div class="fontclass">.search</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">勾</div>
<div class="code">&#xe617;</div>
<div class="fontclass">.gou1</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">home</div>
<div class="code">&#xe611;</div>
<div class="fontclass">.home</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">menu-btn</div>
<div class="code">&#xe60b;</div>
<div class="fontclass">.icon1</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">point1</div>
<div class="code">&#xe60c;</div>
<div class="fontclass">.point1</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">logo2</div>
<div class="code">&#xe60d;</div>
<div class="fontclass">.logo2</div>
</li>
<li>
<i class="icon iconfont"></i>
<div class="name">logo1</div>
<div class="code">&#xe60e;</div>
<div class="fontclass">.logo1</div>
</li>
</ul>
<div class="helps">
第一步:使用font-face声明字体
<pre>
@font-face {font-family: 'iconfont';
src: url('iconfont.eot'); /* IE9*/
src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff') format('woff'), /* chrome、firefox */
url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
</pre>
第二步:定义使用iconfont的样式
<pre>
.iconfont{
font-family:"iconfont" !important;
font-size:16px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;}
</pre>
第三步:挑选相应图标并获取字体编码,应用于页面
<pre>
<i class="iconfont">&#x33;</i>
</pre>
</div>
</div>
</body>
</html>