demo_unicode.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>IconFont</title>
  6. <link rel="stylesheet" href="demo.css">
  7. <style type="text/css">
  8. @font-face {font-family: "iconfont";
  9. src: url('iconfont.eot'); /* IE9*/
  10. src: url('iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
  11. url('iconfont.woff') format('woff'), /* chrome, firefox */
  12. url('iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  13. url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
  14. }
  15. .iconfont {
  16. font-family:"iconfont" !important;
  17. font-size:16px;
  18. font-style:normal;
  19. -webkit-font-smoothing: antialiased;
  20. -webkit-text-stroke-width: 0.2px;
  21. -moz-osx-font-smoothing: grayscale;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="main markdown">
  27. <h1>IconFont 图标</h1>
  28. <ul class="icon_lists clear">
  29. <li>
  30. <i class="icon iconfont">&#xe600;</i>
  31. <div class="name">团</div>
  32. <div class="code">&amp;#xe600;</div>
  33. </li>
  34. <li>
  35. <i class="icon iconfont">&#xe601;</i>
  36. <div class="name">咖啡</div>
  37. <div class="code">&amp;#xe601;</div>
  38. </li>
  39. <li>
  40. <i class="icon iconfont">&#xe602;</i>
  41. <div class="name">社区</div>
  42. <div class="code">&amp;#xe602;</div>
  43. </li>
  44. <li>
  45. <i class="icon iconfont">&#xe60c;</i>
  46. <div class="name">下载</div>
  47. <div class="code">&amp;#xe60c;</div>
  48. </li>
  49. <li>
  50. <i class="icon iconfont">&#xe619;</i>
  51. <div class="name">android</div>
  52. <div class="code">&amp;#xe619;</div>
  53. </li>
  54. <li>
  55. <i class="icon iconfont">&#xe621;</i>
  56. <div class="name">手机</div>
  57. <div class="code">&amp;#xe621;</div>
  58. </li>
  59. <li>
  60. <i class="icon iconfont">&#xe60a;</i>
  61. <div class="name">电话</div>
  62. <div class="code">&amp;#xe60a;</div>
  63. </li>
  64. <li>
  65. <i class="icon iconfont">&#xe625;</i>
  66. <div class="name">电话</div>
  67. <div class="code">&amp;#xe625;</div>
  68. </li>
  69. <li>
  70. <i class="icon iconfont">&#xe61b;</i>
  71. <div class="name">客服</div>
  72. <div class="code">&amp;#xe61b;</div>
  73. </li>
  74. <li>
  75. <i class="icon iconfont">&#xe623;</i>
  76. <div class="name">心</div>
  77. <div class="code">&amp;#xe623;</div>
  78. </li>
  79. <li>
  80. <i class="icon iconfont">&#xe78d;</i>
  81. <div class="name">邀请</div>
  82. <div class="code">&amp;#xe78d;</div>
  83. </li>
  84. <li>
  85. <i class="icon iconfont">&#xe606;</i>
  86. <div class="name">沟通</div>
  87. <div class="code">&amp;#xe606;</div>
  88. </li>
  89. <li>
  90. <i class="icon iconfont">&#xe61d;</i>
  91. <div class="name">鼠标</div>
  92. <div class="code">&amp;#xe61d;</div>
  93. </li>
  94. <li>
  95. <i class="icon iconfont">&#xe646;</i>
  96. <div class="name">医疗</div>
  97. <div class="code">&amp;#xe646;</div>
  98. </li>
  99. <li>
  100. <i class="icon iconfont">&#xe622;</i>
  101. <div class="name">域名解析</div>
  102. <div class="code">&amp;#xe622;</div>
  103. </li>
  104. <li>
  105. <i class="icon iconfont">&#xe60f;</i>
  106. <div class="name">别针</div>
  107. <div class="code">&amp;#xe60f;</div>
  108. </li>
  109. <li>
  110. <i class="icon iconfont">&#xe61e;</i>
  111. <div class="name">右箭头</div>
  112. <div class="code">&amp;#xe61e;</div>
  113. </li>
  114. <li>
  115. <i class="icon iconfont">&#xe62e;</i>
  116. <div class="name">app</div>
  117. <div class="code">&amp;#xe62e;</div>
  118. </li>
  119. <li>
  120. <i class="icon iconfont">&#xe65c;</i>
  121. <div class="name">餐饮</div>
  122. <div class="code">&amp;#xe65c;</div>
  123. </li>
  124. <li>
  125. <i class="icon iconfont">&#xe609;</i>
  126. <div class="name">眼睛</div>
  127. <div class="code">&amp;#xe609;</div>
  128. </li>
  129. <li>
  130. <i class="icon iconfont">&#xe681;</i>
  131. <div class="name">ios</div>
  132. <div class="code">&amp;#xe681;</div>
  133. </li>
  134. <li>
  135. <i class="icon iconfont">&#xe62f;</i>
  136. <div class="name">开发</div>
  137. <div class="code">&amp;#xe62f;</div>
  138. </li>
  139. <li>
  140. <i class="icon iconfont">&#xe635;</i>
  141. <div class="name">微信</div>
  142. <div class="code">&amp;#xe635;</div>
  143. </li>
  144. <li>
  145. <i class="icon iconfont">&#xe647;</i>
  146. <div class="name">1火箭</div>
  147. <div class="code">&amp;#xe647;</div>
  148. </li>
  149. <li>
  150. <i class="icon iconfont">&#xe614;</i>
  151. <div class="name">服务</div>
  152. <div class="code">&amp;#xe614;</div>
  153. </li>
  154. <li>
  155. <i class="icon iconfont">&#xe624;</i>
  156. <div class="name">开启活动</div>
  157. <div class="code">&amp;#xe624;</div>
  158. </li>
  159. <li>
  160. <i class="icon iconfont">&#xe6d3;</i>
  161. <div class="name">电脑</div>
  162. <div class="code">&amp;#xe6d3;</div>
  163. </li>
  164. <li>
  165. <i class="icon iconfont">&#xe9ac;</i>
  166. <div class="name">O2O</div>
  167. <div class="code">&amp;#xe9ac;</div>
  168. </li>
  169. <li>
  170. <i class="icon iconfont">&#xe610;</i>
  171. <div class="name">会员卡</div>
  172. <div class="code">&amp;#xe610;</div>
  173. </li>
  174. <li>
  175. <i class="icon iconfont">&#xe603;</i>
  176. <div class="name">球会选中</div>
  177. <div class="code">&amp;#xe603;</div>
  178. </li>
  179. <li>
  180. <i class="icon iconfont">&#xe856;</i>
  181. <div class="name">线上</div>
  182. <div class="code">&amp;#xe856;</div>
  183. </li>
  184. <li>
  185. <i class="icon iconfont">&#xe634;</i>
  186. <div class="name">wifi</div>
  187. <div class="code">&amp;#xe634;</div>
  188. </li>
  189. <li>
  190. <i class="icon iconfont">&#xe60d;</i>
  191. <div class="name">旅游</div>
  192. <div class="code">&amp;#xe60d;</div>
  193. </li>
  194. <li>
  195. <i class="icon iconfont">&#xe6fe;</i>
  196. <div class="name">qq</div>
  197. <div class="code">&amp;#xe6fe;</div>
  198. </li>
  199. <li>
  200. <i class="icon iconfont">&#xe63e;</i>
  201. <div class="name">客服</div>
  202. <div class="code">&amp;#xe63e;</div>
  203. </li>
  204. <li>
  205. <i class="icon iconfont">&#xe604;</i>
  206. <div class="name">维护</div>
  207. <div class="code">&amp;#xe604;</div>
  208. </li>
  209. <li>
  210. <i class="icon iconfont">&#xe70a;</i>
  211. <div class="name">买入份额</div>
  212. <div class="code">&amp;#xe70a;</div>
  213. </li>
  214. <li>
  215. <i class="icon iconfont">&#xe62a;</i>
  216. <div class="name">返回顶部</div>
  217. <div class="code">&amp;#xe62a;</div>
  218. </li>
  219. <li>
  220. <i class="icon iconfont">&#xe626;</i>
  221. <div class="name">系统</div>
  222. <div class="code">&amp;#xe626;</div>
  223. </li>
  224. <li>
  225. <i class="icon iconfont">&#xe631;</i>
  226. <div class="name">菜单</div>
  227. <div class="code">&amp;#xe631;</div>
  228. </li>
  229. <li>
  230. <i class="icon iconfont">&#xe630;</i>
  231. <div class="name">兼容性</div>
  232. <div class="code">&amp;#xe630;</div>
  233. </li>
  234. <li>
  235. <i class="icon iconfont">&#xe6a4;</i>
  236. <div class="name">更多</div>
  237. <div class="code">&amp;#xe6a4;</div>
  238. </li>
  239. <li>
  240. <i class="icon iconfont">&#xe611;</i>
  241. <div class="name">UI</div>
  242. <div class="code">&amp;#xe611;</div>
  243. </li>
  244. <li>
  245. <i class="icon iconfont">&#xe6b9;</i>
  246. <div class="name">交互原型设计</div>
  247. <div class="code">&amp;#xe6b9;</div>
  248. </li>
  249. <li>
  250. <i class="icon iconfont">&#xe617;</i>
  251. <div class="name">客服</div>
  252. <div class="code">&amp;#xe617;</div>
  253. </li>
  254. <li>
  255. <i class="icon iconfont">&#xe660;</i>
  256. <div class="name">商城</div>
  257. <div class="code">&amp;#xe660;</div>
  258. </li>
  259. <li>
  260. <i class="icon iconfont">&#xe63d;</i>
  261. <div class="name">错</div>
  262. <div class="code">&amp;#xe63d;</div>
  263. </li>
  264. <li>
  265. <i class="icon iconfont">&#xe605;</i>
  266. <div class="name">台灯</div>
  267. <div class="code">&amp;#xe605;</div>
  268. </li>
  269. <li>
  270. <i class="icon iconfont">&#xe661;</i>
  271. <div class="name">iconfont整合-29</div>
  272. <div class="code">&amp;#xe661;</div>
  273. </li>
  274. <li>
  275. <i class="icon iconfont">&#xe644;</i>
  276. <div class="name">培训 (1)</div>
  277. <div class="code">&amp;#xe644;</div>
  278. </li>
  279. <li>
  280. <i class="icon iconfont">&#xe838;</i>
  281. <div class="name">上传</div>
  282. <div class="code">&amp;#xe838;</div>
  283. </li>
  284. <li>
  285. <i class="icon iconfont">&#xe64c;</i>
  286. <div class="name">聊天</div>
  287. <div class="code">&amp;#xe64c;</div>
  288. </li>
  289. <li>
  290. <i class="icon iconfont">&#xe64e;</i>
  291. <div class="name">相册</div>
  292. <div class="code">&amp;#xe64e;</div>
  293. </li>
  294. <li>
  295. <i class="icon iconfont">&#xe60b;</i>
  296. <div class="name">相机</div>
  297. <div class="code">&amp;#xe60b;</div>
  298. </li>
  299. <li>
  300. <i class="icon iconfont">&#xe65d;</i>
  301. <div class="name">视觉设计</div>
  302. <div class="code">&amp;#xe65d;</div>
  303. </li>
  304. <li>
  305. <i class="icon iconfont">&#xe642;</i>
  306. <div class="name">流程</div>
  307. <div class="code">&amp;#xe642;</div>
  308. </li>
  309. <li>
  310. <i class="icon iconfont">&#xe6fa;</i>
  311. <div class="name">拼图</div>
  312. <div class="code">&amp;#xe6fa;</div>
  313. </li>
  314. <li>
  315. <i class="icon iconfont">&#xe615;</i>
  316. <div class="name">下载</div>
  317. <div class="code">&amp;#xe615;</div>
  318. </li>
  319. <li>
  320. <i class="icon iconfont">&#xe62d;</i>
  321. <div class="name">数据</div>
  322. <div class="code">&amp;#xe62d;</div>
  323. </li>
  324. <li>
  325. <i class="icon iconfont">&#xe60e;</i>
  326. <div class="name">设计</div>
  327. <div class="code">&amp;#xe60e;</div>
  328. </li>
  329. <li>
  330. <i class="icon iconfont">&#xe616;</i>
  331. <div class="name">营销信息</div>
  332. <div class="code">&amp;#xe616;</div>
  333. </li>
  334. <li>
  335. <i class="icon iconfont">&#xe7f7;</i>
  336. <div class="name">汽车</div>
  337. <div class="code">&amp;#xe7f7;</div>
  338. </li>
  339. <li>
  340. <i class="icon iconfont">&#xe638;</i>
  341. <div class="name">徽章</div>
  342. <div class="code">&amp;#xe638;</div>
  343. </li>
  344. <li>
  345. <i class="icon iconfont">&#xe607;</i>
  346. <div class="name">工具</div>
  347. <div class="code">&amp;#xe607;</div>
  348. </li>
  349. <li>
  350. <i class="icon iconfont">&#xe66a;</i>
  351. <div class="name">向右</div>
  352. <div class="code">&amp;#xe66a;</div>
  353. </li>
  354. <li>
  355. <i class="icon iconfont">&#xe618;</i>
  356. <div class="name">设置</div>
  357. <div class="code">&amp;#xe618;</div>
  358. </li>
  359. <li>
  360. <i class="icon iconfont">&#xe613;</i>
  361. <div class="name">电话</div>
  362. <div class="code">&amp;#xe613;</div>
  363. </li>
  364. <li>
  365. <i class="icon iconfont">&#xe639;</i>
  366. <div class="name">银行卡</div>
  367. <div class="code">&amp;#xe639;</div>
  368. </li>
  369. <li>
  370. <i class="icon iconfont">&#xe608;</i>
  371. <div class="name">电脑</div>
  372. <div class="code">&amp;#xe608;</div>
  373. </li>
  374. <li>
  375. <i class="icon iconfont">&#xe637;</i>
  376. <div class="name">电商</div>
  377. <div class="code">&amp;#xe637;</div>
  378. </li>
  379. <li>
  380. <i class="icon iconfont">&#xe636;</i>
  381. <div class="name">金融</div>
  382. <div class="code">&amp;#xe636;</div>
  383. </li>
  384. <li>
  385. <i class="icon iconfont">&#xe698;</i>
  386. <div class="name">合同</div>
  387. <div class="code">&amp;#xe698;</div>
  388. </li>
  389. <li>
  390. <i class="icon iconfont">&#xe684;</i>
  391. <div class="name">6收货验收</div>
  392. <div class="code">&amp;#xe684;</div>
  393. </li>
  394. <li>
  395. <i class="icon iconfont">&#xe61a;</i>
  396. <div class="name">累计营业额</div>
  397. <div class="code">&amp;#xe61a;</div>
  398. </li>
  399. <li>
  400. <i class="icon iconfont">&#xe662;</i>
  401. <div class="name">微信</div>
  402. <div class="code">&amp;#xe662;</div>
  403. </li>
  404. </ul>
  405. <h2 id="unicode-">unicode引用</h2>
  406. <hr>
  407. <p>unicode是字体在网页端最原始的应用方式,特点是:</p>
  408. <ul>
  409. <li>兼容性最好,支持ie6+,及所有现代浏览器。</li>
  410. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  411. <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
  412. </ul>
  413. <blockquote>
  414. <p>注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式</p>
  415. </blockquote>
  416. <p>unicode使用步骤如下:</p>
  417. <h3 id="-font-face">第一步:拷贝项目下面生成的font-face</h3>
  418. <pre><code class="lang-js hljs javascript">@font-face {
  419. font-family: <span class="hljs-string">'iconfont'</span>;
  420. src: url(<span class="hljs-string">'iconfont.eot'</span>);
  421. src: url(<span class="hljs-string">'iconfont.eot?#iefix'</span>) format(<span class="hljs-string">'embedded-opentype'</span>),
  422. url(<span class="hljs-string">'iconfont.woff'</span>) format(<span class="hljs-string">'woff'</span>),
  423. url(<span class="hljs-string">'iconfont.ttf'</span>) format(<span class="hljs-string">'truetype'</span>),
  424. url(<span class="hljs-string">'iconfont.svg#iconfont'</span>) format(<span class="hljs-string">'svg'</span>);
  425. }
  426. </code></pre>
  427. <h3 id="-iconfont-">第二步:定义使用iconfont的样式</h3>
  428. <pre><code class="lang-js hljs javascript">.iconfont{
  429. font-family:<span class="hljs-string">"iconfont"</span> !important;
  430. font-size:<span class="hljs-number">16</span>px;font-style:normal;
  431. -webkit-font-smoothing: antialiased;
  432. -webkit-text-stroke-width: <span class="hljs-number">0.2</span>px;
  433. -moz-osx-font-smoothing: grayscale;
  434. }
  435. </code></pre>
  436. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  437. <pre><code class="lang-js hljs javascript">&lt;i <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"iconfont"</span>&gt;&amp;#x33;<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span></span></code></pre>
  438. <blockquote>
  439. <p>"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
  440. </blockquote>
  441. </div>
  442. </body>
  443. </html>