demo_index.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  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=2103869" 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">&#xe679;</span>
  32. <div class="name">常见问题</div>
  33. <div class="code-name">&amp;#xe679;</div>
  34. </li>
  35. <li class="dib">
  36. <span class="icon iconfont">&#xe67a;</span>
  37. <div class="name">活动</div>
  38. <div class="code-name">&amp;#xe67a;</div>
  39. </li>
  40. <li class="dib">
  41. <span class="icon iconfont">&#xe67b;</span>
  42. <div class="name">履约</div>
  43. <div class="code-name">&amp;#xe67b;</div>
  44. </li>
  45. <li class="dib">
  46. <span class="icon iconfont">&#xe67e;</span>
  47. <div class="name">履约备份</div>
  48. <div class="code-name">&amp;#xe67e;</div>
  49. </li>
  50. <li class="dib">
  51. <span class="icon iconfont">&#xe681;</span>
  52. <div class="name">碳普惠</div>
  53. <div class="code-name">&amp;#xe681;</div>
  54. </li>
  55. <li class="dib">
  56. <span class="icon iconfont">&#xe682;</span>
  57. <div class="name">中和</div>
  58. <div class="code-name">&amp;#xe682;</div>
  59. </li>
  60. <li class="dib">
  61. <span class="icon iconfont">&#xe660;</span>
  62. <div class="name">步骤条纵向结果&步骤条纵向成功</div>
  63. <div class="code-name">&amp;#xe660;</div>
  64. </li>
  65. <li class="dib">
  66. <span class="icon iconfont">&#xe661;</span>
  67. <div class="name">关闭</div>
  68. <div class="code-name">&amp;#xe661;</div>
  69. </li>
  70. <li class="dib">
  71. <span class="icon iconfont">&#xe662;</span>
  72. <div class="name">企业用户</div>
  73. <div class="code-name">&amp;#xe662;</div>
  74. </li>
  75. <li class="dib">
  76. <span class="icon iconfont">&#xe663;</span>
  77. <div class="name">路径</div>
  78. <div class="code-name">&amp;#xe663;</div>
  79. </li>
  80. <li class="dib">
  81. <span class="icon iconfont">&#xe664;</span>
  82. <div class="name">箭头</div>
  83. <div class="code-name">&amp;#xe664;</div>
  84. </li>
  85. <li class="dib">
  86. <span class="icon iconfont">&#xe665;</span>
  87. <div class="name">个人用户</div>
  88. <div class="code-name">&amp;#xe665;</div>
  89. </li>
  90. <li class="dib">
  91. <span class="icon iconfont">&#xe666;</span>
  92. <div class="name">我的碳汇量</div>
  93. <div class="code-name">&amp;#xe666;</div>
  94. </li>
  95. <li class="dib">
  96. <span class="icon iconfont">&#xe667;</span>
  97. <div class="name">我的碳汇量备份 2</div>
  98. <div class="code-name">&amp;#xe667;</div>
  99. </li>
  100. <li class="dib">
  101. <span class="icon iconfont">&#xe669;</span>
  102. <div class="name">用户指南</div>
  103. <div class="code-name">&amp;#xe669;</div>
  104. </li>
  105. <li class="dib">
  106. <span class="icon iconfont">&#xe66a;</span>
  107. <div class="name">我的碳汇量备份</div>
  108. <div class="code-name">&amp;#xe66a;</div>
  109. </li>
  110. <li class="dib">
  111. <span class="icon iconfont">&#xe66b;</span>
  112. <div class="name">认购</div>
  113. <div class="code-name">&amp;#xe66b;</div>
  114. </li>
  115. <li class="dib">
  116. <span class="icon iconfont">&#xe66c;</span>
  117. <div class="name">我的碳汇量备份 4</div>
  118. <div class="code-name">&amp;#xe66c;</div>
  119. </li>
  120. <li class="dib">
  121. <span class="icon iconfont">&#xe66d;</span>
  122. <div class="name">down-s</div>
  123. <div class="code-name">&amp;#xe66d;</div>
  124. </li>
  125. <li class="dib">
  126. <span class="icon iconfont">&#xe66e;</span>
  127. <div class="name">购买</div>
  128. <div class="code-name">&amp;#xe66e;</div>
  129. </li>
  130. <li class="dib">
  131. <span class="icon iconfont">&#xe66f;</span>
  132. <div class="name">home-灰色</div>
  133. <div class="code-name">&amp;#xe66f;</div>
  134. </li>
  135. <li class="dib">
  136. <span class="icon iconfont">&#xe670;</span>
  137. <div class="name">证书</div>
  138. <div class="code-name">&amp;#xe670;</div>
  139. </li>
  140. <li class="dib">
  141. <span class="icon iconfont">&#xe671;</span>
  142. <div class="name">home-fill</div>
  143. <div class="code-name">&amp;#xe671;</div>
  144. </li>
  145. <li class="dib">
  146. <span class="icon iconfont">&#xe672;</span>
  147. <div class="name">smile备份 3</div>
  148. <div class="code-name">&amp;#xe672;</div>
  149. </li>
  150. <li class="dib">
  151. <span class="icon iconfont">&#xe673;</span>
  152. <div class="name">refresh</div>
  153. <div class="code-name">&amp;#xe673;</div>
  154. </li>
  155. <li class="dib">
  156. <span class="icon iconfont">&#xe674;</span>
  157. <div class="name">smile</div>
  158. <div class="code-name">&amp;#xe674;</div>
  159. </li>
  160. <li class="dib">
  161. <span class="icon iconfont">&#xe675;</span>
  162. <div class="name">smile备份 2</div>
  163. <div class="code-name">&amp;#xe675;</div>
  164. </li>
  165. <li class="dib">
  166. <span class="icon iconfont">&#xe676;</span>
  167. <div class="name">smile备份</div>
  168. <div class="code-name">&amp;#xe676;</div>
  169. </li>
  170. <li class="dib">
  171. <span class="icon iconfont">&#xe677;</span>
  172. <div class="name">user选中</div>
  173. <div class="code-name">&amp;#xe677;</div>
  174. </li>
  175. <li class="dib">
  176. <span class="icon iconfont">&#xe678;</span>
  177. <div class="name">user备份</div>
  178. <div class="code-name">&amp;#xe678;</div>
  179. </li>
  180. <li class="dib">
  181. <span class="icon iconfont">&#xe65f;</span>
  182. <div class="name">深色</div>
  183. <div class="code-name">&amp;#xe65f;</div>
  184. </li>
  185. <li class="dib">
  186. <span class="icon iconfont">&#xedac;</span>
  187. <div class="name">greenleaf</div>
  188. <div class="code-name">&amp;#xedac;</div>
  189. </li>
  190. </ul>
  191. <div class="article markdown">
  192. <h2 id="unicode-">Unicode 引用</h2>
  193. <hr>
  194. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  195. <ul>
  196. <li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
  197. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  198. <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
  199. </ul>
  200. <blockquote>
  201. <p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
  202. </blockquote>
  203. <p>Unicode 使用步骤如下:</p>
  204. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  205. <pre><code class="language-css"
  206. >@font-face {
  207. font-family: 'iconfont';
  208. src: url('iconfont.eot');
  209. src: url('iconfont.eot?#iefix') format('embedded-opentype'),
  210. url('iconfont.woff2') format('woff2'),
  211. url('iconfont.woff') format('woff'),
  212. url('iconfont.ttf') format('truetype'),
  213. url('iconfont.svg#iconfont') format('svg');
  214. }
  215. </code></pre>
  216. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  217. <pre><code class="language-css"
  218. >.iconfont {
  219. font-family: "iconfont" !important;
  220. font-size: 16px;
  221. font-style: normal;
  222. -webkit-font-smoothing: antialiased;
  223. -moz-osx-font-smoothing: grayscale;
  224. }
  225. </code></pre>
  226. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  227. <pre>
  228. <code class="language-html"
  229. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  230. </code></pre>
  231. <blockquote>
  232. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  233. </blockquote>
  234. </div>
  235. </div>
  236. <div class="content font-class">
  237. <ul class="icon_lists dib-box">
  238. <li class="dib">
  239. <span class="icon iconfont icon-changjianwenti"></span>
  240. <div class="name">
  241. 常见问题
  242. </div>
  243. <div class="code-name">.icon-changjianwenti
  244. </div>
  245. </li>
  246. <li class="dib">
  247. <span class="icon iconfont icon-huodong"></span>
  248. <div class="name">
  249. 活动
  250. </div>
  251. <div class="code-name">.icon-huodong
  252. </div>
  253. </li>
  254. <li class="dib">
  255. <span class="icon iconfont icon-lvyue"></span>
  256. <div class="name">
  257. 履约
  258. </div>
  259. <div class="code-name">.icon-lvyue
  260. </div>
  261. </li>
  262. <li class="dib">
  263. <span class="icon iconfont icon-lvyuebeifen"></span>
  264. <div class="name">
  265. 履约备份
  266. </div>
  267. <div class="code-name">.icon-lvyuebeifen
  268. </div>
  269. </li>
  270. <li class="dib">
  271. <span class="icon iconfont icon-tanpuhui"></span>
  272. <div class="name">
  273. 碳普惠
  274. </div>
  275. <div class="code-name">.icon-tanpuhui
  276. </div>
  277. </li>
  278. <li class="dib">
  279. <span class="icon iconfont icon-zhonghe"></span>
  280. <div class="name">
  281. 中和
  282. </div>
  283. <div class="code-name">.icon-zhonghe
  284. </div>
  285. </li>
  286. <li class="dib">
  287. <span class="icon iconfont icon-buzhoutiaozongxiangjieguobuzhoutiaozongxiangchenggong"></span>
  288. <div class="name">
  289. 步骤条纵向结果&步骤条纵向成功
  290. </div>
  291. <div class="code-name">.icon-buzhoutiaozongxiangjieguobuzhoutiaozongxiangchenggong
  292. </div>
  293. </li>
  294. <li class="dib">
  295. <span class="icon iconfont icon-guanbi"></span>
  296. <div class="name">
  297. 关闭
  298. </div>
  299. <div class="code-name">.icon-guanbi
  300. </div>
  301. </li>
  302. <li class="dib">
  303. <span class="icon iconfont icon-qiyeyonghu"></span>
  304. <div class="name">
  305. 企业用户
  306. </div>
  307. <div class="code-name">.icon-qiyeyonghu
  308. </div>
  309. </li>
  310. <li class="dib">
  311. <span class="icon iconfont icon-lujing"></span>
  312. <div class="name">
  313. 路径
  314. </div>
  315. <div class="code-name">.icon-lujing
  316. </div>
  317. </li>
  318. <li class="dib">
  319. <span class="icon iconfont icon-jiantou"></span>
  320. <div class="name">
  321. 箭头
  322. </div>
  323. <div class="code-name">.icon-jiantou
  324. </div>
  325. </li>
  326. <li class="dib">
  327. <span class="icon iconfont icon-gerenyonghu"></span>
  328. <div class="name">
  329. 个人用户
  330. </div>
  331. <div class="code-name">.icon-gerenyonghu
  332. </div>
  333. </li>
  334. <li class="dib">
  335. <span class="icon iconfont icon-wodetanhuiliang"></span>
  336. <div class="name">
  337. 我的碳汇量
  338. </div>
  339. <div class="code-name">.icon-wodetanhuiliang
  340. </div>
  341. </li>
  342. <li class="dib">
  343. <span class="icon iconfont icon-wodetanhuiliangbeifen2"></span>
  344. <div class="name">
  345. 我的碳汇量备份 2
  346. </div>
  347. <div class="code-name">.icon-wodetanhuiliangbeifen2
  348. </div>
  349. </li>
  350. <li class="dib">
  351. <span class="icon iconfont icon-yonghuzhinan"></span>
  352. <div class="name">
  353. 用户指南
  354. </div>
  355. <div class="code-name">.icon-yonghuzhinan
  356. </div>
  357. </li>
  358. <li class="dib">
  359. <span class="icon iconfont icon-wodetanhuiliangbeifen"></span>
  360. <div class="name">
  361. 我的碳汇量备份
  362. </div>
  363. <div class="code-name">.icon-wodetanhuiliangbeifen
  364. </div>
  365. </li>
  366. <li class="dib">
  367. <span class="icon iconfont icon-rengou"></span>
  368. <div class="name">
  369. 认购
  370. </div>
  371. <div class="code-name">.icon-rengou
  372. </div>
  373. </li>
  374. <li class="dib">
  375. <span class="icon iconfont icon-wodetanhuiliangbeifen4"></span>
  376. <div class="name">
  377. 我的碳汇量备份 4
  378. </div>
  379. <div class="code-name">.icon-wodetanhuiliangbeifen4
  380. </div>
  381. </li>
  382. <li class="dib">
  383. <span class="icon iconfont icon-down-s"></span>
  384. <div class="name">
  385. down-s
  386. </div>
  387. <div class="code-name">.icon-down-s
  388. </div>
  389. </li>
  390. <li class="dib">
  391. <span class="icon iconfont icon-goumai"></span>
  392. <div class="name">
  393. 购买
  394. </div>
  395. <div class="code-name">.icon-goumai
  396. </div>
  397. </li>
  398. <li class="dib">
  399. <span class="icon iconfont icon-home-huise"></span>
  400. <div class="name">
  401. home-灰色
  402. </div>
  403. <div class="code-name">.icon-home-huise
  404. </div>
  405. </li>
  406. <li class="dib">
  407. <span class="icon iconfont icon-zhengshu"></span>
  408. <div class="name">
  409. 证书
  410. </div>
  411. <div class="code-name">.icon-zhengshu
  412. </div>
  413. </li>
  414. <li class="dib">
  415. <span class="icon iconfont icon-home-fill"></span>
  416. <div class="name">
  417. home-fill
  418. </div>
  419. <div class="code-name">.icon-home-fill
  420. </div>
  421. </li>
  422. <li class="dib">
  423. <span class="icon iconfont icon-smilebeifen3"></span>
  424. <div class="name">
  425. smile备份 3
  426. </div>
  427. <div class="code-name">.icon-smilebeifen3
  428. </div>
  429. </li>
  430. <li class="dib">
  431. <span class="icon iconfont icon-refresh"></span>
  432. <div class="name">
  433. refresh
  434. </div>
  435. <div class="code-name">.icon-refresh
  436. </div>
  437. </li>
  438. <li class="dib">
  439. <span class="icon iconfont icon-smile"></span>
  440. <div class="name">
  441. smile
  442. </div>
  443. <div class="code-name">.icon-smile
  444. </div>
  445. </li>
  446. <li class="dib">
  447. <span class="icon iconfont icon-smilebeifen2"></span>
  448. <div class="name">
  449. smile备份 2
  450. </div>
  451. <div class="code-name">.icon-smilebeifen2
  452. </div>
  453. </li>
  454. <li class="dib">
  455. <span class="icon iconfont icon-smilebeifen"></span>
  456. <div class="name">
  457. smile备份
  458. </div>
  459. <div class="code-name">.icon-smilebeifen
  460. </div>
  461. </li>
  462. <li class="dib">
  463. <span class="icon iconfont icon-userxuanzhong"></span>
  464. <div class="name">
  465. user选中
  466. </div>
  467. <div class="code-name">.icon-userxuanzhong
  468. </div>
  469. </li>
  470. <li class="dib">
  471. <span class="icon iconfont icon-userbeifen"></span>
  472. <div class="name">
  473. user备份
  474. </div>
  475. <div class="code-name">.icon-userbeifen
  476. </div>
  477. </li>
  478. <li class="dib">
  479. <span class="icon iconfont icon-shense"></span>
  480. <div class="name">
  481. 深色
  482. </div>
  483. <div class="code-name">.icon-shense
  484. </div>
  485. </li>
  486. <li class="dib">
  487. <span class="icon iconfont icon-greenleaf"></span>
  488. <div class="name">
  489. greenleaf
  490. </div>
  491. <div class="code-name">.icon-greenleaf
  492. </div>
  493. </li>
  494. </ul>
  495. <div class="article markdown">
  496. <h2 id="font-class-">font-class 引用</h2>
  497. <hr>
  498. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  499. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  500. <ul>
  501. <li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
  502. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  503. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  504. <li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
  505. </ul>
  506. <p>使用步骤如下:</p>
  507. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  508. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  509. </code></pre>
  510. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  511. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  512. </code></pre>
  513. <blockquote>
  514. <p>"
  515. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  516. </blockquote>
  517. </div>
  518. </div>
  519. <div class="content symbol">
  520. <ul class="icon_lists dib-box">
  521. <li class="dib">
  522. <svg class="icon svg-icon" aria-hidden="true">
  523. <use xlink:href="#icon-changjianwenti"></use>
  524. </svg>
  525. <div class="name">常见问题</div>
  526. <div class="code-name">#icon-changjianwenti</div>
  527. </li>
  528. <li class="dib">
  529. <svg class="icon svg-icon" aria-hidden="true">
  530. <use xlink:href="#icon-huodong"></use>
  531. </svg>
  532. <div class="name">活动</div>
  533. <div class="code-name">#icon-huodong</div>
  534. </li>
  535. <li class="dib">
  536. <svg class="icon svg-icon" aria-hidden="true">
  537. <use xlink:href="#icon-lvyue"></use>
  538. </svg>
  539. <div class="name">履约</div>
  540. <div class="code-name">#icon-lvyue</div>
  541. </li>
  542. <li class="dib">
  543. <svg class="icon svg-icon" aria-hidden="true">
  544. <use xlink:href="#icon-lvyuebeifen"></use>
  545. </svg>
  546. <div class="name">履约备份</div>
  547. <div class="code-name">#icon-lvyuebeifen</div>
  548. </li>
  549. <li class="dib">
  550. <svg class="icon svg-icon" aria-hidden="true">
  551. <use xlink:href="#icon-tanpuhui"></use>
  552. </svg>
  553. <div class="name">碳普惠</div>
  554. <div class="code-name">#icon-tanpuhui</div>
  555. </li>
  556. <li class="dib">
  557. <svg class="icon svg-icon" aria-hidden="true">
  558. <use xlink:href="#icon-zhonghe"></use>
  559. </svg>
  560. <div class="name">中和</div>
  561. <div class="code-name">#icon-zhonghe</div>
  562. </li>
  563. <li class="dib">
  564. <svg class="icon svg-icon" aria-hidden="true">
  565. <use xlink:href="#icon-buzhoutiaozongxiangjieguobuzhoutiaozongxiangchenggong"></use>
  566. </svg>
  567. <div class="name">步骤条纵向结果&步骤条纵向成功</div>
  568. <div class="code-name">#icon-buzhoutiaozongxiangjieguobuzhoutiaozongxiangchenggong</div>
  569. </li>
  570. <li class="dib">
  571. <svg class="icon svg-icon" aria-hidden="true">
  572. <use xlink:href="#icon-guanbi"></use>
  573. </svg>
  574. <div class="name">关闭</div>
  575. <div class="code-name">#icon-guanbi</div>
  576. </li>
  577. <li class="dib">
  578. <svg class="icon svg-icon" aria-hidden="true">
  579. <use xlink:href="#icon-qiyeyonghu"></use>
  580. </svg>
  581. <div class="name">企业用户</div>
  582. <div class="code-name">#icon-qiyeyonghu</div>
  583. </li>
  584. <li class="dib">
  585. <svg class="icon svg-icon" aria-hidden="true">
  586. <use xlink:href="#icon-lujing"></use>
  587. </svg>
  588. <div class="name">路径</div>
  589. <div class="code-name">#icon-lujing</div>
  590. </li>
  591. <li class="dib">
  592. <svg class="icon svg-icon" aria-hidden="true">
  593. <use xlink:href="#icon-jiantou"></use>
  594. </svg>
  595. <div class="name">箭头</div>
  596. <div class="code-name">#icon-jiantou</div>
  597. </li>
  598. <li class="dib">
  599. <svg class="icon svg-icon" aria-hidden="true">
  600. <use xlink:href="#icon-gerenyonghu"></use>
  601. </svg>
  602. <div class="name">个人用户</div>
  603. <div class="code-name">#icon-gerenyonghu</div>
  604. </li>
  605. <li class="dib">
  606. <svg class="icon svg-icon" aria-hidden="true">
  607. <use xlink:href="#icon-wodetanhuiliang"></use>
  608. </svg>
  609. <div class="name">我的碳汇量</div>
  610. <div class="code-name">#icon-wodetanhuiliang</div>
  611. </li>
  612. <li class="dib">
  613. <svg class="icon svg-icon" aria-hidden="true">
  614. <use xlink:href="#icon-wodetanhuiliangbeifen2"></use>
  615. </svg>
  616. <div class="name">我的碳汇量备份 2</div>
  617. <div class="code-name">#icon-wodetanhuiliangbeifen2</div>
  618. </li>
  619. <li class="dib">
  620. <svg class="icon svg-icon" aria-hidden="true">
  621. <use xlink:href="#icon-yonghuzhinan"></use>
  622. </svg>
  623. <div class="name">用户指南</div>
  624. <div class="code-name">#icon-yonghuzhinan</div>
  625. </li>
  626. <li class="dib">
  627. <svg class="icon svg-icon" aria-hidden="true">
  628. <use xlink:href="#icon-wodetanhuiliangbeifen"></use>
  629. </svg>
  630. <div class="name">我的碳汇量备份</div>
  631. <div class="code-name">#icon-wodetanhuiliangbeifen</div>
  632. </li>
  633. <li class="dib">
  634. <svg class="icon svg-icon" aria-hidden="true">
  635. <use xlink:href="#icon-rengou"></use>
  636. </svg>
  637. <div class="name">认购</div>
  638. <div class="code-name">#icon-rengou</div>
  639. </li>
  640. <li class="dib">
  641. <svg class="icon svg-icon" aria-hidden="true">
  642. <use xlink:href="#icon-wodetanhuiliangbeifen4"></use>
  643. </svg>
  644. <div class="name">我的碳汇量备份 4</div>
  645. <div class="code-name">#icon-wodetanhuiliangbeifen4</div>
  646. </li>
  647. <li class="dib">
  648. <svg class="icon svg-icon" aria-hidden="true">
  649. <use xlink:href="#icon-down-s"></use>
  650. </svg>
  651. <div class="name">down-s</div>
  652. <div class="code-name">#icon-down-s</div>
  653. </li>
  654. <li class="dib">
  655. <svg class="icon svg-icon" aria-hidden="true">
  656. <use xlink:href="#icon-goumai"></use>
  657. </svg>
  658. <div class="name">购买</div>
  659. <div class="code-name">#icon-goumai</div>
  660. </li>
  661. <li class="dib">
  662. <svg class="icon svg-icon" aria-hidden="true">
  663. <use xlink:href="#icon-home-huise"></use>
  664. </svg>
  665. <div class="name">home-灰色</div>
  666. <div class="code-name">#icon-home-huise</div>
  667. </li>
  668. <li class="dib">
  669. <svg class="icon svg-icon" aria-hidden="true">
  670. <use xlink:href="#icon-zhengshu"></use>
  671. </svg>
  672. <div class="name">证书</div>
  673. <div class="code-name">#icon-zhengshu</div>
  674. </li>
  675. <li class="dib">
  676. <svg class="icon svg-icon" aria-hidden="true">
  677. <use xlink:href="#icon-home-fill"></use>
  678. </svg>
  679. <div class="name">home-fill</div>
  680. <div class="code-name">#icon-home-fill</div>
  681. </li>
  682. <li class="dib">
  683. <svg class="icon svg-icon" aria-hidden="true">
  684. <use xlink:href="#icon-smilebeifen3"></use>
  685. </svg>
  686. <div class="name">smile备份 3</div>
  687. <div class="code-name">#icon-smilebeifen3</div>
  688. </li>
  689. <li class="dib">
  690. <svg class="icon svg-icon" aria-hidden="true">
  691. <use xlink:href="#icon-refresh"></use>
  692. </svg>
  693. <div class="name">refresh</div>
  694. <div class="code-name">#icon-refresh</div>
  695. </li>
  696. <li class="dib">
  697. <svg class="icon svg-icon" aria-hidden="true">
  698. <use xlink:href="#icon-smile"></use>
  699. </svg>
  700. <div class="name">smile</div>
  701. <div class="code-name">#icon-smile</div>
  702. </li>
  703. <li class="dib">
  704. <svg class="icon svg-icon" aria-hidden="true">
  705. <use xlink:href="#icon-smilebeifen2"></use>
  706. </svg>
  707. <div class="name">smile备份 2</div>
  708. <div class="code-name">#icon-smilebeifen2</div>
  709. </li>
  710. <li class="dib">
  711. <svg class="icon svg-icon" aria-hidden="true">
  712. <use xlink:href="#icon-smilebeifen"></use>
  713. </svg>
  714. <div class="name">smile备份</div>
  715. <div class="code-name">#icon-smilebeifen</div>
  716. </li>
  717. <li class="dib">
  718. <svg class="icon svg-icon" aria-hidden="true">
  719. <use xlink:href="#icon-userxuanzhong"></use>
  720. </svg>
  721. <div class="name">user选中</div>
  722. <div class="code-name">#icon-userxuanzhong</div>
  723. </li>
  724. <li class="dib">
  725. <svg class="icon svg-icon" aria-hidden="true">
  726. <use xlink:href="#icon-userbeifen"></use>
  727. </svg>
  728. <div class="name">user备份</div>
  729. <div class="code-name">#icon-userbeifen</div>
  730. </li>
  731. <li class="dib">
  732. <svg class="icon svg-icon" aria-hidden="true">
  733. <use xlink:href="#icon-shense"></use>
  734. </svg>
  735. <div class="name">深色</div>
  736. <div class="code-name">#icon-shense</div>
  737. </li>
  738. <li class="dib">
  739. <svg class="icon svg-icon" aria-hidden="true">
  740. <use xlink:href="#icon-greenleaf"></use>
  741. </svg>
  742. <div class="name">greenleaf</div>
  743. <div class="code-name">#icon-greenleaf</div>
  744. </li>
  745. </ul>
  746. <div class="article markdown">
  747. <h2 id="symbol-">Symbol 引用</h2>
  748. <hr>
  749. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  750. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  751. <ul>
  752. <li>支持多色图标了,不再受单色限制。</li>
  753. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  754. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  755. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  756. </ul>
  757. <p>使用步骤如下:</p>
  758. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  759. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  760. </code></pre>
  761. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  762. <pre><code class="language-html">&lt;style&gt;
  763. .icon {
  764. width: 1em;
  765. height: 1em;
  766. vertical-align: -0.15em;
  767. fill: currentColor;
  768. overflow: hidden;
  769. }
  770. &lt;/style&gt;
  771. </code></pre>
  772. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  773. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  774. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  775. &lt;/svg&gt;
  776. </code></pre>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. <script>
  782. $(document).ready(function () {
  783. $('.tab-container .content:first').show()
  784. $('#tabs li').click(function (e) {
  785. var tabContent = $('.tab-container .content')
  786. var index = $(this).index()
  787. if ($(this).hasClass('active')) {
  788. return
  789. } else {
  790. $('#tabs li').removeClass('active')
  791. $(this).addClass('active')
  792. tabContent.hide().eq(index).fadeIn()
  793. }
  794. })
  795. })
  796. </script>
  797. </body>
  798. </html>