demo_index.html 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>IconFont Demo</title>
  6. <link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
  7. <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
  8. <link rel="stylesheet" href="demo.css">
  9. <link rel="stylesheet" href="iconfont.css">
  10. <script src="iconfont.js"></script>
  11. <!-- jQuery -->
  12. <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
  13. <!-- 代码高亮 -->
  14. <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
  15. </head>
  16. <body>
  17. <div class="main">
  18. <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
  19. <div class="nav-tabs">
  20. <ul id="tabs" class="dib-box">
  21. <li class="dib active"><span>Unicode</span></li>
  22. <li class="dib"><span>Font class</span></li>
  23. <li class="dib"><span>Symbol</span></li>
  24. </ul>
  25. <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=2162195" target="_blank" class="nav-more">查看项目</a>
  26. </div>
  27. <div class="tab-container">
  28. <div class="content unicode" style="display: block;">
  29. <ul class="icon_lists dib-box">
  30. <li class="dib">
  31. <span class="icon iconfont">&#xe697;</span>
  32. <div class="name">[9]</div>
  33. <div class="code-name">&amp;#xe697;</div>
  34. </li>
  35. <li class="dib">
  36. <span class="icon iconfont">&#xe698;</span>
  37. <div class="name">[A]</div>
  38. <div class="code-name">&amp;#xe698;</div>
  39. </li>
  40. <li class="dib">
  41. <span class="icon iconfont">&#xe699;</span>
  42. <div class="name">[7]</div>
  43. <div class="code-name">&amp;#xe699;</div>
  44. </li>
  45. <li class="dib">
  46. <span class="icon iconfont">&#xe69a;</span>
  47. <div class="name">[B]</div>
  48. <div class="code-name">&amp;#xe69a;</div>
  49. </li>
  50. <li class="dib">
  51. <span class="icon iconfont">&#xe69b;</span>
  52. <div class="name">[8]</div>
  53. <div class="code-name">&amp;#xe69b;</div>
  54. </li>
  55. <li class="dib">
  56. <span class="icon iconfont">&#xe69c;</span>
  57. <div class="name">[D]</div>
  58. <div class="code-name">&amp;#xe69c;</div>
  59. </li>
  60. <li class="dib">
  61. <span class="icon iconfont">&#xe69d;</span>
  62. <div class="name">[C]</div>
  63. <div class="code-name">&amp;#xe69d;</div>
  64. </li>
  65. <li class="dib">
  66. <span class="icon iconfont">&#xe69e;</span>
  67. <div class="name">[E]</div>
  68. <div class="code-name">&amp;#xe69e;</div>
  69. </li>
  70. <li class="dib">
  71. <span class="icon iconfont">&#xe69f;</span>
  72. <div class="name">[G]</div>
  73. <div class="code-name">&amp;#xe69f;</div>
  74. </li>
  75. <li class="dib">
  76. <span class="icon iconfont">&#xe6a1;</span>
  77. <div class="name">[F]</div>
  78. <div class="code-name">&amp;#xe6a1;</div>
  79. </li>
  80. <li class="dib">
  81. <span class="icon iconfont">&#xe6a2;</span>
  82. <div class="name">[I]</div>
  83. <div class="code-name">&amp;#xe6a2;</div>
  84. </li>
  85. <li class="dib">
  86. <span class="icon iconfont">&#xe6a3;</span>
  87. <div class="name">[H]</div>
  88. <div class="code-name">&amp;#xe6a3;</div>
  89. </li>
  90. <li class="dib">
  91. <span class="icon iconfont">&#xe6a4;</span>
  92. <div class="name">[L]</div>
  93. <div class="code-name">&amp;#xe6a4;</div>
  94. </li>
  95. <li class="dib">
  96. <span class="icon iconfont">&#xe6a5;</span>
  97. <div class="name">[J]</div>
  98. <div class="code-name">&amp;#xe6a5;</div>
  99. </li>
  100. <li class="dib">
  101. <span class="icon iconfont">&#xe6a6;</span>
  102. <div class="name">[O]</div>
  103. <div class="code-name">&amp;#xe6a6;</div>
  104. </li>
  105. <li class="dib">
  106. <span class="icon iconfont">&#xe6a7;</span>
  107. <div class="name">[N]</div>
  108. <div class="code-name">&amp;#xe6a7;</div>
  109. </li>
  110. <li class="dib">
  111. <span class="icon iconfont">&#xe6a8;</span>
  112. <div class="name">[M]</div>
  113. <div class="code-name">&amp;#xe6a8;</div>
  114. </li>
  115. <li class="dib">
  116. <span class="icon iconfont">&#xe6a9;</span>
  117. <div class="name">[K]</div>
  118. <div class="code-name">&amp;#xe6a9;</div>
  119. </li>
  120. <li class="dib">
  121. <span class="icon iconfont">&#xe6aa;</span>
  122. <div class="name">[S]</div>
  123. <div class="code-name">&amp;#xe6aa;</div>
  124. </li>
  125. <li class="dib">
  126. <span class="icon iconfont">&#xe6ab;</span>
  127. <div class="name">[V]</div>
  128. <div class="code-name">&amp;#xe6ab;</div>
  129. </li>
  130. <li class="dib">
  131. <span class="icon iconfont">&#xe6ac;</span>
  132. <div class="name">[Q]</div>
  133. <div class="code-name">&amp;#xe6ac;</div>
  134. </li>
  135. <li class="dib">
  136. <span class="icon iconfont">&#xe6ad;</span>
  137. <div class="name">[T]</div>
  138. <div class="code-name">&amp;#xe6ad;</div>
  139. </li>
  140. <li class="dib">
  141. <span class="icon iconfont">&#xe6ae;</span>
  142. <div class="name">[Y]</div>
  143. <div class="code-name">&amp;#xe6ae;</div>
  144. </li>
  145. <li class="dib">
  146. <span class="icon iconfont">&#xe6af;</span>
  147. <div class="name">[0]</div>
  148. <div class="code-name">&amp;#xe6af;</div>
  149. </li>
  150. <li class="dib">
  151. <span class="icon iconfont">&#xe6b0;</span>
  152. <div class="name">[R]</div>
  153. <div class="code-name">&amp;#xe6b0;</div>
  154. </li>
  155. <li class="dib">
  156. <span class="icon iconfont">&#xe6b1;</span>
  157. <div class="name">[W]</div>
  158. <div class="code-name">&amp;#xe6b1;</div>
  159. </li>
  160. <li class="dib">
  161. <span class="icon iconfont">&#xe6b2;</span>
  162. <div class="name">[U]</div>
  163. <div class="code-name">&amp;#xe6b2;</div>
  164. </li>
  165. <li class="dib">
  166. <span class="icon iconfont">&#xe6b3;</span>
  167. <div class="name">[Z]</div>
  168. <div class="code-name">&amp;#xe6b3;</div>
  169. </li>
  170. <li class="dib">
  171. <span class="icon iconfont">&#xe6b4;</span>
  172. <div class="name">[4]</div>
  173. <div class="code-name">&amp;#xe6b4;</div>
  174. </li>
  175. <li class="dib">
  176. <span class="icon iconfont">&#xe6b5;</span>
  177. <div class="name">[X]</div>
  178. <div class="code-name">&amp;#xe6b5;</div>
  179. </li>
  180. <li class="dib">
  181. <span class="icon iconfont">&#xe6b6;</span>
  182. <div class="name">[5]</div>
  183. <div class="code-name">&amp;#xe6b6;</div>
  184. </li>
  185. <li class="dib">
  186. <span class="icon iconfont">&#xe6b7;</span>
  187. <div class="name">[6]</div>
  188. <div class="code-name">&amp;#xe6b7;</div>
  189. </li>
  190. <li class="dib">
  191. <span class="icon iconfont">&#xe6b8;</span>
  192. <div class="name">[1]</div>
  193. <div class="code-name">&amp;#xe6b8;</div>
  194. </li>
  195. <li class="dib">
  196. <span class="icon iconfont">&#xe6b9;</span>
  197. <div class="name">[3]</div>
  198. <div class="code-name">&amp;#xe6b9;</div>
  199. </li>
  200. <li class="dib">
  201. <span class="icon iconfont">&#xe6ba;</span>
  202. <div class="name">[2]</div>
  203. <div class="code-name">&amp;#xe6ba;</div>
  204. </li>
  205. <li class="dib">
  206. <span class="icon iconfont">&#xe6bb;</span>
  207. <div class="name">[P]</div>
  208. <div class="code-name">&amp;#xe6bb;</div>
  209. </li>
  210. <li class="dib">
  211. <span class="icon iconfont">&#xe6a0;</span>
  212. <div class="name"> 提示</div>
  213. <div class="code-name">&amp;#xe6a0;</div>
  214. </li>
  215. <li class="dib">
  216. <span class="icon iconfont">&#xe66d;</span>
  217. <div class="name">edit</div>
  218. <div class="code-name">&amp;#xe66d;</div>
  219. </li>
  220. <li class="dib">
  221. <span class="icon iconfont">&#xe600;</span>
  222. <div class="name">删除筛选项</div>
  223. <div class="code-name">&amp;#xe600;</div>
  224. </li>
  225. </ul>
  226. <div class="article markdown">
  227. <h2 id="unicode-">Unicode 引用</h2>
  228. <hr>
  229. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  230. <ul>
  231. <li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
  232. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  233. <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
  234. </ul>
  235. <blockquote>
  236. <p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
  237. </blockquote>
  238. <p>Unicode 使用步骤如下:</p>
  239. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  240. <pre><code class="language-css"
  241. >@font-face {
  242. font-family: 'iconfont';
  243. src: url('iconfont.eot');
  244. src: url('iconfont.eot?#iefix') format('embedded-opentype'),
  245. url('iconfont.woff2') format('woff2'),
  246. url('iconfont.woff') format('woff'),
  247. url('iconfont.ttf') format('truetype'),
  248. url('iconfont.svg#iconfont') format('svg');
  249. }
  250. </code></pre>
  251. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  252. <pre><code class="language-css"
  253. >.iconfont {
  254. font-family: "iconfont" !important;
  255. font-size: 16px;
  256. font-style: normal;
  257. -webkit-font-smoothing: antialiased;
  258. -moz-osx-font-smoothing: grayscale;
  259. }
  260. </code></pre>
  261. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  262. <pre>
  263. <code class="language-html"
  264. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  265. </code></pre>
  266. <blockquote>
  267. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  268. </blockquote>
  269. </div>
  270. </div>
  271. <div class="content font-class">
  272. <ul class="icon_lists dib-box">
  273. <li class="dib">
  274. <span class="icon iconfont iconnum_9"></span>
  275. <div class="name">
  276. [9]
  277. </div>
  278. <div class="code-name">.iconnum_9
  279. </div>
  280. </li>
  281. <li class="dib">
  282. <span class="icon iconfont iconwords_0"></span>
  283. <div class="name">
  284. [A]
  285. </div>
  286. <div class="code-name">.iconwords_0
  287. </div>
  288. </li>
  289. <li class="dib">
  290. <span class="icon iconfont iconnum_7"></span>
  291. <div class="name">
  292. [7]
  293. </div>
  294. <div class="code-name">.iconnum_7
  295. </div>
  296. </li>
  297. <li class="dib">
  298. <span class="icon iconfont iconwords_1"></span>
  299. <div class="name">
  300. [B]
  301. </div>
  302. <div class="code-name">.iconwords_1
  303. </div>
  304. </li>
  305. <li class="dib">
  306. <span class="icon iconfont iconnum_8"></span>
  307. <div class="name">
  308. [8]
  309. </div>
  310. <div class="code-name">.iconnum_8
  311. </div>
  312. </li>
  313. <li class="dib">
  314. <span class="icon iconfont iconwords_3"></span>
  315. <div class="name">
  316. [D]
  317. </div>
  318. <div class="code-name">.iconwords_3
  319. </div>
  320. </li>
  321. <li class="dib">
  322. <span class="icon iconfont iconwords_2"></span>
  323. <div class="name">
  324. [C]
  325. </div>
  326. <div class="code-name">.iconwords_2
  327. </div>
  328. </li>
  329. <li class="dib">
  330. <span class="icon iconfont iconwords_4"></span>
  331. <div class="name">
  332. [E]
  333. </div>
  334. <div class="code-name">.iconwords_4
  335. </div>
  336. </li>
  337. <li class="dib">
  338. <span class="icon iconfont iconwords_6"></span>
  339. <div class="name">
  340. [G]
  341. </div>
  342. <div class="code-name">.iconwords_6
  343. </div>
  344. </li>
  345. <li class="dib">
  346. <span class="icon iconfont iconwords_5"></span>
  347. <div class="name">
  348. [F]
  349. </div>
  350. <div class="code-name">.iconwords_5
  351. </div>
  352. </li>
  353. <li class="dib">
  354. <span class="icon iconfont iconwords_8"></span>
  355. <div class="name">
  356. [I]
  357. </div>
  358. <div class="code-name">.iconwords_8
  359. </div>
  360. </li>
  361. <li class="dib">
  362. <span class="icon iconfont iconwords_7"></span>
  363. <div class="name">
  364. [H]
  365. </div>
  366. <div class="code-name">.iconwords_7
  367. </div>
  368. </li>
  369. <li class="dib">
  370. <span class="icon iconfont iconwords_11"></span>
  371. <div class="name">
  372. [L]
  373. </div>
  374. <div class="code-name">.iconwords_11
  375. </div>
  376. </li>
  377. <li class="dib">
  378. <span class="icon iconfont iconwords_9"></span>
  379. <div class="name">
  380. [J]
  381. </div>
  382. <div class="code-name">.iconwords_9
  383. </div>
  384. </li>
  385. <li class="dib">
  386. <span class="icon iconfont iconwords_14"></span>
  387. <div class="name">
  388. [O]
  389. </div>
  390. <div class="code-name">.iconwords_14
  391. </div>
  392. </li>
  393. <li class="dib">
  394. <span class="icon iconfont iconwords_13"></span>
  395. <div class="name">
  396. [N]
  397. </div>
  398. <div class="code-name">.iconwords_13
  399. </div>
  400. </li>
  401. <li class="dib">
  402. <span class="icon iconfont iconwords_12"></span>
  403. <div class="name">
  404. [M]
  405. </div>
  406. <div class="code-name">.iconwords_12
  407. </div>
  408. </li>
  409. <li class="dib">
  410. <span class="icon iconfont iconwords_10"></span>
  411. <div class="name">
  412. [K]
  413. </div>
  414. <div class="code-name">.iconwords_10
  415. </div>
  416. </li>
  417. <li class="dib">
  418. <span class="icon iconfont iconwords_18"></span>
  419. <div class="name">
  420. [S]
  421. </div>
  422. <div class="code-name">.iconwords_18
  423. </div>
  424. </li>
  425. <li class="dib">
  426. <span class="icon iconfont iconwords_21"></span>
  427. <div class="name">
  428. [V]
  429. </div>
  430. <div class="code-name">.iconwords_21
  431. </div>
  432. </li>
  433. <li class="dib">
  434. <span class="icon iconfont iconwords_16"></span>
  435. <div class="name">
  436. [Q]
  437. </div>
  438. <div class="code-name">.iconwords_16
  439. </div>
  440. </li>
  441. <li class="dib">
  442. <span class="icon iconfont iconwords_19"></span>
  443. <div class="name">
  444. [T]
  445. </div>
  446. <div class="code-name">.iconwords_19
  447. </div>
  448. </li>
  449. <li class="dib">
  450. <span class="icon iconfont iconwords_24"></span>
  451. <div class="name">
  452. [Y]
  453. </div>
  454. <div class="code-name">.iconwords_24
  455. </div>
  456. </li>
  457. <li class="dib">
  458. <span class="icon iconfont iconnum_0"></span>
  459. <div class="name">
  460. [0]
  461. </div>
  462. <div class="code-name">.iconnum_0
  463. </div>
  464. </li>
  465. <li class="dib">
  466. <span class="icon iconfont iconwords_17"></span>
  467. <div class="name">
  468. [R]
  469. </div>
  470. <div class="code-name">.iconwords_17
  471. </div>
  472. </li>
  473. <li class="dib">
  474. <span class="icon iconfont iconwords_22"></span>
  475. <div class="name">
  476. [W]
  477. </div>
  478. <div class="code-name">.iconwords_22
  479. </div>
  480. </li>
  481. <li class="dib">
  482. <span class="icon iconfont iconwords_20"></span>
  483. <div class="name">
  484. [U]
  485. </div>
  486. <div class="code-name">.iconwords_20
  487. </div>
  488. </li>
  489. <li class="dib">
  490. <span class="icon iconfont iconwords_25"></span>
  491. <div class="name">
  492. [Z]
  493. </div>
  494. <div class="code-name">.iconwords_25
  495. </div>
  496. </li>
  497. <li class="dib">
  498. <span class="icon iconfont iconnum_4"></span>
  499. <div class="name">
  500. [4]
  501. </div>
  502. <div class="code-name">.iconnum_4
  503. </div>
  504. </li>
  505. <li class="dib">
  506. <span class="icon iconfont iconwords_23"></span>
  507. <div class="name">
  508. [X]
  509. </div>
  510. <div class="code-name">.iconwords_23
  511. </div>
  512. </li>
  513. <li class="dib">
  514. <span class="icon iconfont iconnum_5"></span>
  515. <div class="name">
  516. [5]
  517. </div>
  518. <div class="code-name">.iconnum_5
  519. </div>
  520. </li>
  521. <li class="dib">
  522. <span class="icon iconfont iconnum_6"></span>
  523. <div class="name">
  524. [6]
  525. </div>
  526. <div class="code-name">.iconnum_6
  527. </div>
  528. </li>
  529. <li class="dib">
  530. <span class="icon iconfont iconnum_1"></span>
  531. <div class="name">
  532. [1]
  533. </div>
  534. <div class="code-name">.iconnum_1
  535. </div>
  536. </li>
  537. <li class="dib">
  538. <span class="icon iconfont iconnum_3"></span>
  539. <div class="name">
  540. [3]
  541. </div>
  542. <div class="code-name">.iconnum_3
  543. </div>
  544. </li>
  545. <li class="dib">
  546. <span class="icon iconfont iconnum_2"></span>
  547. <div class="name">
  548. [2]
  549. </div>
  550. <div class="code-name">.iconnum_2
  551. </div>
  552. </li>
  553. <li class="dib">
  554. <span class="icon iconfont iconwords_15"></span>
  555. <div class="name">
  556. [P]
  557. </div>
  558. <div class="code-name">.iconwords_15
  559. </div>
  560. </li>
  561. <li class="dib">
  562. <span class="icon iconfont icontishi1"></span>
  563. <div class="name">
  564. 提示
  565. </div>
  566. <div class="code-name">.icontishi1
  567. </div>
  568. </li>
  569. <li class="dib">
  570. <span class="icon iconfont iconedit"></span>
  571. <div class="name">
  572. edit
  573. </div>
  574. <div class="code-name">.iconedit
  575. </div>
  576. </li>
  577. <li class="dib">
  578. <span class="icon iconfont icondelete"></span>
  579. <div class="name">
  580. 删除筛选项
  581. </div>
  582. <div class="code-name">.icondelete
  583. </div>
  584. </li>
  585. </ul>
  586. <div class="article markdown">
  587. <h2 id="font-class-">font-class 引用</h2>
  588. <hr>
  589. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  590. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  591. <ul>
  592. <li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
  593. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  594. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  595. <li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
  596. </ul>
  597. <p>使用步骤如下:</p>
  598. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  599. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  600. </code></pre>
  601. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  602. <pre><code class="language-html">&lt;span class="iconfont iconxxx"&gt;&lt;/span&gt;
  603. </code></pre>
  604. <blockquote>
  605. <p>"
  606. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  607. </blockquote>
  608. </div>
  609. </div>
  610. <div class="content symbol">
  611. <ul class="icon_lists dib-box">
  612. <li class="dib">
  613. <svg class="icon svg-icon" aria-hidden="true">
  614. <use xlink:href="#iconnum_9"></use>
  615. </svg>
  616. <div class="name">[9]</div>
  617. <div class="code-name">#iconnum_9</div>
  618. </li>
  619. <li class="dib">
  620. <svg class="icon svg-icon" aria-hidden="true">
  621. <use xlink:href="#iconwords_0"></use>
  622. </svg>
  623. <div class="name">[A]</div>
  624. <div class="code-name">#iconwords_0</div>
  625. </li>
  626. <li class="dib">
  627. <svg class="icon svg-icon" aria-hidden="true">
  628. <use xlink:href="#iconnum_7"></use>
  629. </svg>
  630. <div class="name">[7]</div>
  631. <div class="code-name">#iconnum_7</div>
  632. </li>
  633. <li class="dib">
  634. <svg class="icon svg-icon" aria-hidden="true">
  635. <use xlink:href="#iconwords_1"></use>
  636. </svg>
  637. <div class="name">[B]</div>
  638. <div class="code-name">#iconwords_1</div>
  639. </li>
  640. <li class="dib">
  641. <svg class="icon svg-icon" aria-hidden="true">
  642. <use xlink:href="#iconnum_8"></use>
  643. </svg>
  644. <div class="name">[8]</div>
  645. <div class="code-name">#iconnum_8</div>
  646. </li>
  647. <li class="dib">
  648. <svg class="icon svg-icon" aria-hidden="true">
  649. <use xlink:href="#iconwords_3"></use>
  650. </svg>
  651. <div class="name">[D]</div>
  652. <div class="code-name">#iconwords_3</div>
  653. </li>
  654. <li class="dib">
  655. <svg class="icon svg-icon" aria-hidden="true">
  656. <use xlink:href="#iconwords_2"></use>
  657. </svg>
  658. <div class="name">[C]</div>
  659. <div class="code-name">#iconwords_2</div>
  660. </li>
  661. <li class="dib">
  662. <svg class="icon svg-icon" aria-hidden="true">
  663. <use xlink:href="#iconwords_4"></use>
  664. </svg>
  665. <div class="name">[E]</div>
  666. <div class="code-name">#iconwords_4</div>
  667. </li>
  668. <li class="dib">
  669. <svg class="icon svg-icon" aria-hidden="true">
  670. <use xlink:href="#iconwords_6"></use>
  671. </svg>
  672. <div class="name">[G]</div>
  673. <div class="code-name">#iconwords_6</div>
  674. </li>
  675. <li class="dib">
  676. <svg class="icon svg-icon" aria-hidden="true">
  677. <use xlink:href="#iconwords_5"></use>
  678. </svg>
  679. <div class="name">[F]</div>
  680. <div class="code-name">#iconwords_5</div>
  681. </li>
  682. <li class="dib">
  683. <svg class="icon svg-icon" aria-hidden="true">
  684. <use xlink:href="#iconwords_8"></use>
  685. </svg>
  686. <div class="name">[I]</div>
  687. <div class="code-name">#iconwords_8</div>
  688. </li>
  689. <li class="dib">
  690. <svg class="icon svg-icon" aria-hidden="true">
  691. <use xlink:href="#iconwords_7"></use>
  692. </svg>
  693. <div class="name">[H]</div>
  694. <div class="code-name">#iconwords_7</div>
  695. </li>
  696. <li class="dib">
  697. <svg class="icon svg-icon" aria-hidden="true">
  698. <use xlink:href="#iconwords_11"></use>
  699. </svg>
  700. <div class="name">[L]</div>
  701. <div class="code-name">#iconwords_11</div>
  702. </li>
  703. <li class="dib">
  704. <svg class="icon svg-icon" aria-hidden="true">
  705. <use xlink:href="#iconwords_9"></use>
  706. </svg>
  707. <div class="name">[J]</div>
  708. <div class="code-name">#iconwords_9</div>
  709. </li>
  710. <li class="dib">
  711. <svg class="icon svg-icon" aria-hidden="true">
  712. <use xlink:href="#iconwords_14"></use>
  713. </svg>
  714. <div class="name">[O]</div>
  715. <div class="code-name">#iconwords_14</div>
  716. </li>
  717. <li class="dib">
  718. <svg class="icon svg-icon" aria-hidden="true">
  719. <use xlink:href="#iconwords_13"></use>
  720. </svg>
  721. <div class="name">[N]</div>
  722. <div class="code-name">#iconwords_13</div>
  723. </li>
  724. <li class="dib">
  725. <svg class="icon svg-icon" aria-hidden="true">
  726. <use xlink:href="#iconwords_12"></use>
  727. </svg>
  728. <div class="name">[M]</div>
  729. <div class="code-name">#iconwords_12</div>
  730. </li>
  731. <li class="dib">
  732. <svg class="icon svg-icon" aria-hidden="true">
  733. <use xlink:href="#iconwords_10"></use>
  734. </svg>
  735. <div class="name">[K]</div>
  736. <div class="code-name">#iconwords_10</div>
  737. </li>
  738. <li class="dib">
  739. <svg class="icon svg-icon" aria-hidden="true">
  740. <use xlink:href="#iconwords_18"></use>
  741. </svg>
  742. <div class="name">[S]</div>
  743. <div class="code-name">#iconwords_18</div>
  744. </li>
  745. <li class="dib">
  746. <svg class="icon svg-icon" aria-hidden="true">
  747. <use xlink:href="#iconwords_21"></use>
  748. </svg>
  749. <div class="name">[V]</div>
  750. <div class="code-name">#iconwords_21</div>
  751. </li>
  752. <li class="dib">
  753. <svg class="icon svg-icon" aria-hidden="true">
  754. <use xlink:href="#iconwords_16"></use>
  755. </svg>
  756. <div class="name">[Q]</div>
  757. <div class="code-name">#iconwords_16</div>
  758. </li>
  759. <li class="dib">
  760. <svg class="icon svg-icon" aria-hidden="true">
  761. <use xlink:href="#iconwords_19"></use>
  762. </svg>
  763. <div class="name">[T]</div>
  764. <div class="code-name">#iconwords_19</div>
  765. </li>
  766. <li class="dib">
  767. <svg class="icon svg-icon" aria-hidden="true">
  768. <use xlink:href="#iconwords_24"></use>
  769. </svg>
  770. <div class="name">[Y]</div>
  771. <div class="code-name">#iconwords_24</div>
  772. </li>
  773. <li class="dib">
  774. <svg class="icon svg-icon" aria-hidden="true">
  775. <use xlink:href="#iconnum_0"></use>
  776. </svg>
  777. <div class="name">[0]</div>
  778. <div class="code-name">#iconnum_0</div>
  779. </li>
  780. <li class="dib">
  781. <svg class="icon svg-icon" aria-hidden="true">
  782. <use xlink:href="#iconwords_17"></use>
  783. </svg>
  784. <div class="name">[R]</div>
  785. <div class="code-name">#iconwords_17</div>
  786. </li>
  787. <li class="dib">
  788. <svg class="icon svg-icon" aria-hidden="true">
  789. <use xlink:href="#iconwords_22"></use>
  790. </svg>
  791. <div class="name">[W]</div>
  792. <div class="code-name">#iconwords_22</div>
  793. </li>
  794. <li class="dib">
  795. <svg class="icon svg-icon" aria-hidden="true">
  796. <use xlink:href="#iconwords_20"></use>
  797. </svg>
  798. <div class="name">[U]</div>
  799. <div class="code-name">#iconwords_20</div>
  800. </li>
  801. <li class="dib">
  802. <svg class="icon svg-icon" aria-hidden="true">
  803. <use xlink:href="#iconwords_25"></use>
  804. </svg>
  805. <div class="name">[Z]</div>
  806. <div class="code-name">#iconwords_25</div>
  807. </li>
  808. <li class="dib">
  809. <svg class="icon svg-icon" aria-hidden="true">
  810. <use xlink:href="#iconnum_4"></use>
  811. </svg>
  812. <div class="name">[4]</div>
  813. <div class="code-name">#iconnum_4</div>
  814. </li>
  815. <li class="dib">
  816. <svg class="icon svg-icon" aria-hidden="true">
  817. <use xlink:href="#iconwords_23"></use>
  818. </svg>
  819. <div class="name">[X]</div>
  820. <div class="code-name">#iconwords_23</div>
  821. </li>
  822. <li class="dib">
  823. <svg class="icon svg-icon" aria-hidden="true">
  824. <use xlink:href="#iconnum_5"></use>
  825. </svg>
  826. <div class="name">[5]</div>
  827. <div class="code-name">#iconnum_5</div>
  828. </li>
  829. <li class="dib">
  830. <svg class="icon svg-icon" aria-hidden="true">
  831. <use xlink:href="#iconnum_6"></use>
  832. </svg>
  833. <div class="name">[6]</div>
  834. <div class="code-name">#iconnum_6</div>
  835. </li>
  836. <li class="dib">
  837. <svg class="icon svg-icon" aria-hidden="true">
  838. <use xlink:href="#iconnum_1"></use>
  839. </svg>
  840. <div class="name">[1]</div>
  841. <div class="code-name">#iconnum_1</div>
  842. </li>
  843. <li class="dib">
  844. <svg class="icon svg-icon" aria-hidden="true">
  845. <use xlink:href="#iconnum_3"></use>
  846. </svg>
  847. <div class="name">[3]</div>
  848. <div class="code-name">#iconnum_3</div>
  849. </li>
  850. <li class="dib">
  851. <svg class="icon svg-icon" aria-hidden="true">
  852. <use xlink:href="#iconnum_2"></use>
  853. </svg>
  854. <div class="name">[2]</div>
  855. <div class="code-name">#iconnum_2</div>
  856. </li>
  857. <li class="dib">
  858. <svg class="icon svg-icon" aria-hidden="true">
  859. <use xlink:href="#iconwords_15"></use>
  860. </svg>
  861. <div class="name">[P]</div>
  862. <div class="code-name">#iconwords_15</div>
  863. </li>
  864. <li class="dib">
  865. <svg class="icon svg-icon" aria-hidden="true">
  866. <use xlink:href="#icontishi1"></use>
  867. </svg>
  868. <div class="name"> 提示</div>
  869. <div class="code-name">#icontishi1</div>
  870. </li>
  871. <li class="dib">
  872. <svg class="icon svg-icon" aria-hidden="true">
  873. <use xlink:href="#iconedit"></use>
  874. </svg>
  875. <div class="name">edit</div>
  876. <div class="code-name">#iconedit</div>
  877. </li>
  878. <li class="dib">
  879. <svg class="icon svg-icon" aria-hidden="true">
  880. <use xlink:href="#icondelete"></use>
  881. </svg>
  882. <div class="name">删除筛选项</div>
  883. <div class="code-name">#icondelete</div>
  884. </li>
  885. </ul>
  886. <div class="article markdown">
  887. <h2 id="symbol-">Symbol 引用</h2>
  888. <hr>
  889. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  890. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  891. <ul>
  892. <li>支持多色图标了,不再受单色限制。</li>
  893. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  894. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  895. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  896. </ul>
  897. <p>使用步骤如下:</p>
  898. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  899. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  900. </code></pre>
  901. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  902. <pre><code class="language-html">&lt;style&gt;
  903. .icon {
  904. width: 1em;
  905. height: 1em;
  906. vertical-align: -0.15em;
  907. fill: currentColor;
  908. overflow: hidden;
  909. }
  910. &lt;/style&gt;
  911. </code></pre>
  912. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  913. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  914. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  915. &lt;/svg&gt;
  916. </code></pre>
  917. </div>
  918. </div>
  919. </div>
  920. </div>
  921. <script>
  922. $(document).ready(function () {
  923. $('.tab-container .content:first').show()
  924. $('#tabs li').click(function (e) {
  925. var tabContent = $('.tab-container .content')
  926. var index = $(this).index()
  927. if ($(this).hasClass('active')) {
  928. return
  929. } else {
  930. $('#tabs li').removeClass('active')
  931. $(this).addClass('active')
  932. tabContent.hide().eq(index).fadeIn()
  933. }
  934. })
  935. })
  936. </script>
  937. </body>
  938. </html>