demo_index.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>iconfont Demo</title>
  6. <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
  7. <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
  8. <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
  9. <link rel="stylesheet" href="demo.css">
  10. <link rel="stylesheet" href="iconfont.css">
  11. <script src="iconfont.js"></script>
  12. <!-- jQuery -->
  13. <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
  14. <!-- 代码高亮 -->
  15. <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
  16. <style>
  17. .main .logo {
  18. margin-top: 0;
  19. height: auto;
  20. }
  21. .main .logo a {
  22. display: flex;
  23. align-items: center;
  24. }
  25. .main .logo .sub-title {
  26. margin-left: 0.5em;
  27. font-size: 22px;
  28. color: #fff;
  29. background: linear-gradient(-45deg, #3967FF, #B500FE);
  30. -webkit-background-clip: text;
  31. -webkit-text-fill-color: transparent;
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <div class="main">
  37. <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
  38. <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
  39. </a></h1>
  40. <div class="nav-tabs">
  41. <ul id="tabs" class="dib-box">
  42. <li class="dib active"><span>Unicode</span></li>
  43. <li class="dib"><span>Font class</span></li>
  44. <li class="dib"><span>Symbol</span></li>
  45. </ul>
  46. <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4430625" target="_blank" class="nav-more">查看项目</a>
  47. </div>
  48. <div class="tab-container">
  49. <div class="content unicode" style="display: block;">
  50. <ul class="icon_lists dib-box">
  51. <li class="dib">
  52. <span class="icon iconfont">&#xe65e;</span>
  53. <div class="name">调拨单</div>
  54. <div class="code-name">&amp;#xe65e;</div>
  55. </li>
  56. <li class="dib">
  57. <span class="icon iconfont">&#xe600;</span>
  58. <div class="name">调拨单-copy</div>
  59. <div class="code-name">&amp;#xe600;</div>
  60. </li>
  61. <li class="dib">
  62. <span class="icon iconfont">&#xe60a;</span>
  63. <div class="name">订单</div>
  64. <div class="code-name">&amp;#xe60a;</div>
  65. </li>
  66. <li class="dib">
  67. <span class="icon iconfont">&#xe606;</span>
  68. <div class="name">我的</div>
  69. <div class="code-name">&amp;#xe606;</div>
  70. </li>
  71. <li class="dib">
  72. <span class="icon iconfont">&#xe63a;</span>
  73. <div class="name">首页</div>
  74. <div class="code-name">&amp;#xe63a;</div>
  75. </li>
  76. <li class="dib">
  77. <span class="icon iconfont">&#xe69d;</span>
  78. <div class="name">调拨</div>
  79. <div class="code-name">&amp;#xe69d;</div>
  80. </li>
  81. <li class="dib">
  82. <span class="icon iconfont">&#xe745;</span>
  83. <div class="name">二维码</div>
  84. <div class="code-name">&amp;#xe745;</div>
  85. </li>
  86. <li class="dib">
  87. <span class="icon iconfont">&#xe822;</span>
  88. <div class="name">默认头像</div>
  89. <div class="code-name">&amp;#xe822;</div>
  90. </li>
  91. <li class="dib">
  92. <span class="icon iconfont">&#xe609;</span>
  93. <div class="name">首页</div>
  94. <div class="code-name">&amp;#xe609;</div>
  95. </li>
  96. <li class="dib">
  97. <span class="icon iconfont">&#xe6e6;</span>
  98. <div class="name">扫码查询</div>
  99. <div class="code-name">&amp;#xe6e6;</div>
  100. </li>
  101. <li class="dib">
  102. <span class="icon iconfont">&#xe64a;</span>
  103. <div class="name">出库单</div>
  104. <div class="code-name">&amp;#xe64a;</div>
  105. </li>
  106. <li class="dib">
  107. <span class="icon iconfont">&#xe623;</span>
  108. <div class="name">待出库</div>
  109. <div class="code-name">&amp;#xe623;</div>
  110. </li>
  111. <li class="dib">
  112. <span class="icon iconfont">&#xe619;</span>
  113. <div class="name">出库单</div>
  114. <div class="code-name">&amp;#xe619;</div>
  115. </li>
  116. <li class="dib">
  117. <span class="icon iconfont">&#xe772;</span>
  118. <div class="name">返库登记</div>
  119. <div class="code-name">&amp;#xe772;</div>
  120. </li>
  121. <li class="dib">
  122. <span class="icon iconfont">&#xe88a;</span>
  123. <div class="name">07配载、装车</div>
  124. <div class="code-name">&amp;#xe88a;</div>
  125. </li>
  126. <li class="dib">
  127. <span class="icon iconfont">&#xe88b;</span>
  128. <div class="name">07配载、装车-线性</div>
  129. <div class="code-name">&amp;#xe88b;</div>
  130. </li>
  131. <li class="dib">
  132. <span class="icon iconfont">&#xe6c4;</span>
  133. <div class="name">回收</div>
  134. <div class="code-name">&amp;#xe6c4;</div>
  135. </li>
  136. <li class="dib">
  137. <span class="icon iconfont">&#xe639;</span>
  138. <div class="name">已到达</div>
  139. <div class="code-name">&amp;#xe639;</div>
  140. </li>
  141. <li class="dib">
  142. <span class="icon iconfont">&#xe76a;</span>
  143. <div class="name">检查项</div>
  144. <div class="code-name">&amp;#xe76a;</div>
  145. </li>
  146. <li class="dib">
  147. <span class="icon iconfont">&#xe668;</span>
  148. <div class="name">运送和交付</div>
  149. <div class="code-name">&amp;#xe668;</div>
  150. </li>
  151. <li class="dib">
  152. <span class="icon iconfont">&#xe60f;</span>
  153. <div class="name">退货</div>
  154. <div class="code-name">&amp;#xe60f;</div>
  155. </li>
  156. <li class="dib">
  157. <span class="icon iconfont">&#xe6a0;</span>
  158. <div class="name">待取件</div>
  159. <div class="code-name">&amp;#xe6a0;</div>
  160. </li>
  161. <li class="dib">
  162. <span class="icon iconfont">&#xe608;</span>
  163. <div class="name">box</div>
  164. <div class="code-name">&amp;#xe608;</div>
  165. </li>
  166. <li class="dib">
  167. <span class="icon iconfont">&#xe814;</span>
  168. <div class="name">液化气瓶</div>
  169. <div class="code-name">&amp;#xe814;</div>
  170. </li>
  171. <li class="dib">
  172. <span class="icon iconfont">&#xeb3f;</span>
  173. <div class="name">消息</div>
  174. <div class="code-name">&amp;#xeb3f;</div>
  175. </li>
  176. <li class="dib">
  177. <span class="icon iconfont">&#xe8ae;</span>
  178. <div class="name">订单</div>
  179. <div class="code-name">&amp;#xe8ae;</div>
  180. </li>
  181. <li class="dib">
  182. <span class="icon iconfont">&#xe66f;</span>
  183. <div class="name">扫一扫</div>
  184. <div class="code-name">&amp;#xe66f;</div>
  185. </li>
  186. <li class="dib">
  187. <span class="icon iconfont">&#xe60e;</span>
  188. <div class="name">我的</div>
  189. <div class="code-name">&amp;#xe60e;</div>
  190. </li>
  191. </ul>
  192. <div class="article markdown">
  193. <h2 id="unicode-">Unicode 引用</h2>
  194. <hr>
  195. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  196. <ul>
  197. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  198. <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
  199. </ul>
  200. <blockquote>
  201. <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG 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.woff2?t=1723624389024') format('woff2'),
  209. url('iconfont.woff?t=1723624389024') format('woff'),
  210. url('iconfont.ttf?t=1723624389024') format('truetype');
  211. }
  212. </code></pre>
  213. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  214. <pre><code class="language-css"
  215. >.iconfont {
  216. font-family: "iconfont" !important;
  217. font-size: 16px;
  218. font-style: normal;
  219. -webkit-font-smoothing: antialiased;
  220. -moz-osx-font-smoothing: grayscale;
  221. }
  222. </code></pre>
  223. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  224. <pre>
  225. <code class="language-html"
  226. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  227. </code></pre>
  228. <blockquote>
  229. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  230. </blockquote>
  231. </div>
  232. </div>
  233. <div class="content font-class">
  234. <ul class="icon_lists dib-box">
  235. <li class="dib">
  236. <span class="icon iconfont icon-tiaobodan"></span>
  237. <div class="name">
  238. 调拨单
  239. </div>
  240. <div class="code-name">.icon-tiaobodan
  241. </div>
  242. </li>
  243. <li class="dib">
  244. <span class="icon iconfont icon-moveais"></span>
  245. <div class="name">
  246. 调拨单-copy
  247. </div>
  248. <div class="code-name">.icon-moveais
  249. </div>
  250. </li>
  251. <li class="dib">
  252. <span class="icon iconfont icon-dingdan2"></span>
  253. <div class="name">
  254. 订单
  255. </div>
  256. <div class="code-name">.icon-dingdan2
  257. </div>
  258. </li>
  259. <li class="dib">
  260. <span class="icon iconfont icon-icon-test"></span>
  261. <div class="name">
  262. 我的
  263. </div>
  264. <div class="code-name">.icon-icon-test
  265. </div>
  266. </li>
  267. <li class="dib">
  268. <span class="icon iconfont icon-shouye1"></span>
  269. <div class="name">
  270. 首页
  271. </div>
  272. <div class="code-name">.icon-shouye1
  273. </div>
  274. </li>
  275. <li class="dib">
  276. <span class="icon iconfont icon-tiaobo"></span>
  277. <div class="name">
  278. 调拨
  279. </div>
  280. <div class="code-name">.icon-tiaobo
  281. </div>
  282. </li>
  283. <li class="dib">
  284. <span class="icon iconfont icon-erweima"></span>
  285. <div class="name">
  286. 二维码
  287. </div>
  288. <div class="code-name">.icon-erweima
  289. </div>
  290. </li>
  291. <li class="dib">
  292. <span class="icon iconfont icon-morentouxiang"></span>
  293. <div class="name">
  294. 默认头像
  295. </div>
  296. <div class="code-name">.icon-morentouxiang
  297. </div>
  298. </li>
  299. <li class="dib">
  300. <span class="icon iconfont icon-shouye"></span>
  301. <div class="name">
  302. 首页
  303. </div>
  304. <div class="code-name">.icon-shouye
  305. </div>
  306. </li>
  307. <li class="dib">
  308. <span class="icon iconfont icon-saomachaxun"></span>
  309. <div class="name">
  310. 扫码查询
  311. </div>
  312. <div class="code-name">.icon-saomachaxun
  313. </div>
  314. </li>
  315. <li class="dib">
  316. <span class="icon iconfont icon-owNote"></span>
  317. <div class="name">
  318. 出库单
  319. </div>
  320. <div class="code-name">.icon-owNote
  321. </div>
  322. </li>
  323. <li class="dib">
  324. <span class="icon iconfont icon-daichuku"></span>
  325. <div class="name">
  326. 待出库
  327. </div>
  328. <div class="code-name">.icon-daichuku
  329. </div>
  330. </li>
  331. <li class="dib">
  332. <span class="icon iconfont icon-chukudan"></span>
  333. <div class="name">
  334. 出库单
  335. </div>
  336. <div class="code-name">.icon-chukudan
  337. </div>
  338. </li>
  339. <li class="dib">
  340. <span class="icon iconfont icon-fankudengji"></span>
  341. <div class="name">
  342. 返库登记
  343. </div>
  344. <div class="code-name">.icon-fankudengji
  345. </div>
  346. </li>
  347. <li class="dib">
  348. <span class="icon iconfont icon-peizaizhuangche"></span>
  349. <div class="name">
  350. 07配载、装车
  351. </div>
  352. <div class="code-name">.icon-peizaizhuangche
  353. </div>
  354. </li>
  355. <li class="dib">
  356. <span class="icon iconfont icon-peizaizhuangche-xianxing"></span>
  357. <div class="name">
  358. 07配载、装车-线性
  359. </div>
  360. <div class="code-name">.icon-peizaizhuangche-xianxing
  361. </div>
  362. </li>
  363. <li class="dib">
  364. <span class="icon iconfont icon-recycling"></span>
  365. <div class="name">
  366. 回收
  367. </div>
  368. <div class="code-name">.icon-recycling
  369. </div>
  370. </li>
  371. <li class="dib">
  372. <span class="icon iconfont icon-yidaoda"></span>
  373. <div class="name">
  374. 已到达
  375. </div>
  376. <div class="code-name">.icon-yidaoda
  377. </div>
  378. </li>
  379. <li class="dib">
  380. <span class="icon iconfont icon-jianchaxiang"></span>
  381. <div class="name">
  382. 检查项
  383. </div>
  384. <div class="code-name">.icon-jianchaxiang
  385. </div>
  386. </li>
  387. <li class="dib">
  388. <span class="icon iconfont icon-yunsonghejiaofu"></span>
  389. <div class="name">
  390. 运送和交付
  391. </div>
  392. <div class="code-name">.icon-yunsonghejiaofu
  393. </div>
  394. </li>
  395. <li class="dib">
  396. <span class="icon iconfont icon-tuihuo"></span>
  397. <div class="name">
  398. 退货
  399. </div>
  400. <div class="code-name">.icon-tuihuo
  401. </div>
  402. </li>
  403. <li class="dib">
  404. <span class="icon iconfont icon-daiqujian"></span>
  405. <div class="name">
  406. 待取件
  407. </div>
  408. <div class="code-name">.icon-daiqujian
  409. </div>
  410. </li>
  411. <li class="dib">
  412. <span class="icon iconfont icon-box"></span>
  413. <div class="name">
  414. box
  415. </div>
  416. <div class="code-name">.icon-box
  417. </div>
  418. </li>
  419. <li class="dib">
  420. <span class="icon iconfont icon-yehuaqiping"></span>
  421. <div class="name">
  422. 液化气瓶
  423. </div>
  424. <div class="code-name">.icon-yehuaqiping
  425. </div>
  426. </li>
  427. <li class="dib">
  428. <span class="icon iconfont icon-a-xiaoxi"></span>
  429. <div class="name">
  430. 消息
  431. </div>
  432. <div class="code-name">.icon-a-xiaoxi
  433. </div>
  434. </li>
  435. <li class="dib">
  436. <span class="icon iconfont icon-dingdan"></span>
  437. <div class="name">
  438. 订单
  439. </div>
  440. <div class="code-name">.icon-dingdan
  441. </div>
  442. </li>
  443. <li class="dib">
  444. <span class="icon iconfont icon-saoyisao"></span>
  445. <div class="name">
  446. 扫一扫
  447. </div>
  448. <div class="code-name">.icon-saoyisao
  449. </div>
  450. </li>
  451. <li class="dib">
  452. <span class="icon iconfont icon-wode"></span>
  453. <div class="name">
  454. 我的
  455. </div>
  456. <div class="code-name">.icon-wode
  457. </div>
  458. </li>
  459. </ul>
  460. <div class="article markdown">
  461. <h2 id="font-class-">font-class 引用</h2>
  462. <hr>
  463. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  464. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  465. <ul>
  466. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  467. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  468. </ul>
  469. <p>使用步骤如下:</p>
  470. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  471. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  472. </code></pre>
  473. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  474. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  475. </code></pre>
  476. <blockquote>
  477. <p>"
  478. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  479. </blockquote>
  480. </div>
  481. </div>
  482. <div class="content symbol">
  483. <ul class="icon_lists dib-box">
  484. <li class="dib">
  485. <svg class="icon svg-icon" aria-hidden="true">
  486. <use xlink:href="#icon-tiaobodan"></use>
  487. </svg>
  488. <div class="name">调拨单</div>
  489. <div class="code-name">#icon-tiaobodan</div>
  490. </li>
  491. <li class="dib">
  492. <svg class="icon svg-icon" aria-hidden="true">
  493. <use xlink:href="#icon-moveais"></use>
  494. </svg>
  495. <div class="name">调拨单-copy</div>
  496. <div class="code-name">#icon-moveais</div>
  497. </li>
  498. <li class="dib">
  499. <svg class="icon svg-icon" aria-hidden="true">
  500. <use xlink:href="#icon-dingdan2"></use>
  501. </svg>
  502. <div class="name">订单</div>
  503. <div class="code-name">#icon-dingdan2</div>
  504. </li>
  505. <li class="dib">
  506. <svg class="icon svg-icon" aria-hidden="true">
  507. <use xlink:href="#icon-icon-test"></use>
  508. </svg>
  509. <div class="name">我的</div>
  510. <div class="code-name">#icon-icon-test</div>
  511. </li>
  512. <li class="dib">
  513. <svg class="icon svg-icon" aria-hidden="true">
  514. <use xlink:href="#icon-shouye1"></use>
  515. </svg>
  516. <div class="name">首页</div>
  517. <div class="code-name">#icon-shouye1</div>
  518. </li>
  519. <li class="dib">
  520. <svg class="icon svg-icon" aria-hidden="true">
  521. <use xlink:href="#icon-tiaobo"></use>
  522. </svg>
  523. <div class="name">调拨</div>
  524. <div class="code-name">#icon-tiaobo</div>
  525. </li>
  526. <li class="dib">
  527. <svg class="icon svg-icon" aria-hidden="true">
  528. <use xlink:href="#icon-erweima"></use>
  529. </svg>
  530. <div class="name">二维码</div>
  531. <div class="code-name">#icon-erweima</div>
  532. </li>
  533. <li class="dib">
  534. <svg class="icon svg-icon" aria-hidden="true">
  535. <use xlink:href="#icon-morentouxiang"></use>
  536. </svg>
  537. <div class="name">默认头像</div>
  538. <div class="code-name">#icon-morentouxiang</div>
  539. </li>
  540. <li class="dib">
  541. <svg class="icon svg-icon" aria-hidden="true">
  542. <use xlink:href="#icon-shouye"></use>
  543. </svg>
  544. <div class="name">首页</div>
  545. <div class="code-name">#icon-shouye</div>
  546. </li>
  547. <li class="dib">
  548. <svg class="icon svg-icon" aria-hidden="true">
  549. <use xlink:href="#icon-saomachaxun"></use>
  550. </svg>
  551. <div class="name">扫码查询</div>
  552. <div class="code-name">#icon-saomachaxun</div>
  553. </li>
  554. <li class="dib">
  555. <svg class="icon svg-icon" aria-hidden="true">
  556. <use xlink:href="#icon-owNote"></use>
  557. </svg>
  558. <div class="name">出库单</div>
  559. <div class="code-name">#icon-owNote</div>
  560. </li>
  561. <li class="dib">
  562. <svg class="icon svg-icon" aria-hidden="true">
  563. <use xlink:href="#icon-daichuku"></use>
  564. </svg>
  565. <div class="name">待出库</div>
  566. <div class="code-name">#icon-daichuku</div>
  567. </li>
  568. <li class="dib">
  569. <svg class="icon svg-icon" aria-hidden="true">
  570. <use xlink:href="#icon-chukudan"></use>
  571. </svg>
  572. <div class="name">出库单</div>
  573. <div class="code-name">#icon-chukudan</div>
  574. </li>
  575. <li class="dib">
  576. <svg class="icon svg-icon" aria-hidden="true">
  577. <use xlink:href="#icon-fankudengji"></use>
  578. </svg>
  579. <div class="name">返库登记</div>
  580. <div class="code-name">#icon-fankudengji</div>
  581. </li>
  582. <li class="dib">
  583. <svg class="icon svg-icon" aria-hidden="true">
  584. <use xlink:href="#icon-peizaizhuangche"></use>
  585. </svg>
  586. <div class="name">07配载、装车</div>
  587. <div class="code-name">#icon-peizaizhuangche</div>
  588. </li>
  589. <li class="dib">
  590. <svg class="icon svg-icon" aria-hidden="true">
  591. <use xlink:href="#icon-peizaizhuangche-xianxing"></use>
  592. </svg>
  593. <div class="name">07配载、装车-线性</div>
  594. <div class="code-name">#icon-peizaizhuangche-xianxing</div>
  595. </li>
  596. <li class="dib">
  597. <svg class="icon svg-icon" aria-hidden="true">
  598. <use xlink:href="#icon-recycling"></use>
  599. </svg>
  600. <div class="name">回收</div>
  601. <div class="code-name">#icon-recycling</div>
  602. </li>
  603. <li class="dib">
  604. <svg class="icon svg-icon" aria-hidden="true">
  605. <use xlink:href="#icon-yidaoda"></use>
  606. </svg>
  607. <div class="name">已到达</div>
  608. <div class="code-name">#icon-yidaoda</div>
  609. </li>
  610. <li class="dib">
  611. <svg class="icon svg-icon" aria-hidden="true">
  612. <use xlink:href="#icon-jianchaxiang"></use>
  613. </svg>
  614. <div class="name">检查项</div>
  615. <div class="code-name">#icon-jianchaxiang</div>
  616. </li>
  617. <li class="dib">
  618. <svg class="icon svg-icon" aria-hidden="true">
  619. <use xlink:href="#icon-yunsonghejiaofu"></use>
  620. </svg>
  621. <div class="name">运送和交付</div>
  622. <div class="code-name">#icon-yunsonghejiaofu</div>
  623. </li>
  624. <li class="dib">
  625. <svg class="icon svg-icon" aria-hidden="true">
  626. <use xlink:href="#icon-tuihuo"></use>
  627. </svg>
  628. <div class="name">退货</div>
  629. <div class="code-name">#icon-tuihuo</div>
  630. </li>
  631. <li class="dib">
  632. <svg class="icon svg-icon" aria-hidden="true">
  633. <use xlink:href="#icon-daiqujian"></use>
  634. </svg>
  635. <div class="name">待取件</div>
  636. <div class="code-name">#icon-daiqujian</div>
  637. </li>
  638. <li class="dib">
  639. <svg class="icon svg-icon" aria-hidden="true">
  640. <use xlink:href="#icon-box"></use>
  641. </svg>
  642. <div class="name">box</div>
  643. <div class="code-name">#icon-box</div>
  644. </li>
  645. <li class="dib">
  646. <svg class="icon svg-icon" aria-hidden="true">
  647. <use xlink:href="#icon-yehuaqiping"></use>
  648. </svg>
  649. <div class="name">液化气瓶</div>
  650. <div class="code-name">#icon-yehuaqiping</div>
  651. </li>
  652. <li class="dib">
  653. <svg class="icon svg-icon" aria-hidden="true">
  654. <use xlink:href="#icon-a-xiaoxi"></use>
  655. </svg>
  656. <div class="name">消息</div>
  657. <div class="code-name">#icon-a-xiaoxi</div>
  658. </li>
  659. <li class="dib">
  660. <svg class="icon svg-icon" aria-hidden="true">
  661. <use xlink:href="#icon-dingdan"></use>
  662. </svg>
  663. <div class="name">订单</div>
  664. <div class="code-name">#icon-dingdan</div>
  665. </li>
  666. <li class="dib">
  667. <svg class="icon svg-icon" aria-hidden="true">
  668. <use xlink:href="#icon-saoyisao"></use>
  669. </svg>
  670. <div class="name">扫一扫</div>
  671. <div class="code-name">#icon-saoyisao</div>
  672. </li>
  673. <li class="dib">
  674. <svg class="icon svg-icon" aria-hidden="true">
  675. <use xlink:href="#icon-wode"></use>
  676. </svg>
  677. <div class="name">我的</div>
  678. <div class="code-name">#icon-wode</div>
  679. </li>
  680. </ul>
  681. <div class="article markdown">
  682. <h2 id="symbol-">Symbol 引用</h2>
  683. <hr>
  684. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  685. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  686. <ul>
  687. <li>支持多色图标了,不再受单色限制。</li>
  688. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  689. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  690. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  691. </ul>
  692. <p>使用步骤如下:</p>
  693. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  694. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  695. </code></pre>
  696. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  697. <pre><code class="language-html">&lt;style&gt;
  698. .icon {
  699. width: 1em;
  700. height: 1em;
  701. vertical-align: -0.15em;
  702. fill: currentColor;
  703. overflow: hidden;
  704. }
  705. &lt;/style&gt;
  706. </code></pre>
  707. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  708. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  709. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  710. &lt;/svg&gt;
  711. </code></pre>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. <script>
  717. $(document).ready(function () {
  718. $('.tab-container .content:first').show()
  719. $('#tabs li').click(function (e) {
  720. var tabContent = $('.tab-container .content')
  721. var index = $(this).index()
  722. if ($(this).hasClass('active')) {
  723. return
  724. } else {
  725. $('#tabs li').removeClass('active')
  726. $(this).addClass('active')
  727. tabContent.hide().eq(index).fadeIn()
  728. }
  729. })
  730. })
  731. </script>
  732. </body>
  733. </html>