星火管控前端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

demo_index.html 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  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=4468064" 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">&#xeb2a;</span>
  53. <div class="name">时间</div>
  54. <div class="code-name">&amp;#xeb2a;</div>
  55. </li>
  56. <li class="dib">
  57. <span class="icon iconfont">&#xe669;</span>
  58. <div class="name">设置</div>
  59. <div class="code-name">&amp;#xe669;</div>
  60. </li>
  61. <li class="dib">
  62. <span class="icon iconfont">&#xe74e;</span>
  63. <div class="name">违规管理</div>
  64. <div class="code-name">&amp;#xe74e;</div>
  65. </li>
  66. <li class="dib">
  67. <span class="icon iconfont">&#xe601;</span>
  68. <div class="name">wifi</div>
  69. <div class="code-name">&amp;#xe601;</div>
  70. </li>
  71. <li class="dib">
  72. <span class="icon iconfont">&#xe67e;</span>
  73. <div class="name">应用策略</div>
  74. <div class="code-name">&amp;#xe67e;</div>
  75. </li>
  76. <li class="dib">
  77. <span class="icon iconfont">&#xe703;</span>
  78. <div class="name">关注-已关注</div>
  79. <div class="code-name">&amp;#xe703;</div>
  80. </li>
  81. <li class="dib">
  82. <span class="icon iconfont">&#xe6a2;</span>
  83. <div class="name">钉-面型</div>
  84. <div class="code-name">&amp;#xe6a2;</div>
  85. </li>
  86. <li class="dib">
  87. <span class="icon iconfont">&#xe60a;</span>
  88. <div class="name">验证码</div>
  89. <div class="code-name">&amp;#xe60a;</div>
  90. </li>
  91. <li class="dib">
  92. <span class="icon iconfont">&#xe62f;</span>
  93. <div class="name">默认头像</div>
  94. <div class="code-name">&amp;#xe62f;</div>
  95. </li>
  96. <li class="dib">
  97. <span class="icon iconfont">&#xe605;</span>
  98. <div class="name">箭头</div>
  99. <div class="code-name">&amp;#xe605;</div>
  100. </li>
  101. <li class="dib">
  102. <span class="icon iconfont">&#xe600;</span>
  103. <div class="name">电量</div>
  104. <div class="code-name">&amp;#xe600;</div>
  105. </li>
  106. <li class="dib">
  107. <span class="icon iconfont">&#xe627;</span>
  108. <div class="name">gengxin</div>
  109. <div class="code-name">&amp;#xe627;</div>
  110. </li>
  111. <li class="dib">
  112. <span class="icon iconfont">&#xf06a;</span>
  113. <div class="name">手机</div>
  114. <div class="code-name">&amp;#xf06a;</div>
  115. </li>
  116. <li class="dib">
  117. <span class="icon iconfont">&#xe7ba;</span>
  118. <div class="name">安卓android</div>
  119. <div class="code-name">&amp;#xe7ba;</div>
  120. </li>
  121. <li class="dib">
  122. <span class="icon iconfont">&#xe61b;</span>
  123. <div class="name">数量流量</div>
  124. <div class="code-name">&amp;#xe61b;</div>
  125. </li>
  126. <li class="dib">
  127. <span class="icon iconfont">&#xe7c5;</span>
  128. <div class="name">USB</div>
  129. <div class="code-name">&amp;#xe7c5;</div>
  130. </li>
  131. <li class="dib">
  132. <span class="icon iconfont">&#xe606;</span>
  133. <div class="name">wifi关闭</div>
  134. <div class="code-name">&amp;#xe606;</div>
  135. </li>
  136. <li class="dib">
  137. <span class="icon iconfont">&#xe643;</span>
  138. <div class="name">复制</div>
  139. <div class="code-name">&amp;#xe643;</div>
  140. </li>
  141. <li class="dib">
  142. <span class="icon iconfont">&#xe657;</span>
  143. <div class="name">icon-OTG</div>
  144. <div class="code-name">&amp;#xe657;</div>
  145. </li>
  146. <li class="dib">
  147. <span class="icon iconfont">&#xe610;</span>
  148. <div class="name">录音</div>
  149. <div class="code-name">&amp;#xe610;</div>
  150. </li>
  151. <li class="dib">
  152. <span class="icon iconfont">&#xe6b2;</span>
  153. <div class="name">蓝牙</div>
  154. <div class="code-name">&amp;#xe6b2;</div>
  155. </li>
  156. <li class="dib">
  157. <span class="icon iconfont">&#xe680;</span>
  158. <div class="name">sd卡</div>
  159. <div class="code-name">&amp;#xe680;</div>
  160. </li>
  161. <li class="dib">
  162. <span class="icon iconfont">&#xe965;</span>
  163. <div class="name">摄像头</div>
  164. <div class="code-name">&amp;#xe965;</div>
  165. </li>
  166. <li class="dib">
  167. <span class="icon iconfont">&#xe6fc;</span>
  168. <div class="name">电话短信_line</div>
  169. <div class="code-name">&amp;#xe6fc;</div>
  170. </li>
  171. <li class="dib">
  172. <span class="icon iconfont">&#xe68b;</span>
  173. <div class="name">bx-wifi-2</div>
  174. <div class="code-name">&amp;#xe68b;</div>
  175. </li>
  176. <li class="dib">
  177. <span class="icon iconfont">&#xe67c;</span>
  178. <div class="name">GPS信息</div>
  179. <div class="code-name">&amp;#xe67c;</div>
  180. </li>
  181. <li class="dib">
  182. <span class="icon iconfont">&#xe616;</span>
  183. <div class="name">wifi_fiber</div>
  184. <div class="code-name">&amp;#xe616;</div>
  185. </li>
  186. </ul>
  187. <div class="article markdown">
  188. <h2 id="unicode-">Unicode 引用</h2>
  189. <hr>
  190. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  191. <ul>
  192. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  193. <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
  194. </ul>
  195. <blockquote>
  196. <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
  197. </blockquote>
  198. <p>Unicode 使用步骤如下:</p>
  199. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  200. <pre><code class="language-css"
  201. >@font-face {
  202. font-family: 'iconfont';
  203. src: url('iconfont.woff2?t=1712547599749') format('woff2'),
  204. url('iconfont.woff?t=1712547599749') format('woff'),
  205. url('iconfont.ttf?t=1712547599749') format('truetype');
  206. }
  207. </code></pre>
  208. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  209. <pre><code class="language-css"
  210. >.iconfont {
  211. font-family: "iconfont" !important;
  212. font-size: 16px;
  213. font-style: normal;
  214. -webkit-font-smoothing: antialiased;
  215. -moz-osx-font-smoothing: grayscale;
  216. }
  217. </code></pre>
  218. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  219. <pre>
  220. <code class="language-html"
  221. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  222. </code></pre>
  223. <blockquote>
  224. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  225. </blockquote>
  226. </div>
  227. </div>
  228. <div class="content font-class">
  229. <ul class="icon_lists dib-box">
  230. <li class="dib">
  231. <span class="icon iconfont icon-shijian"></span>
  232. <div class="name">
  233. 时间
  234. </div>
  235. <div class="code-name">.icon-shijian
  236. </div>
  237. </li>
  238. <li class="dib">
  239. <span class="icon iconfont icon-shezhi"></span>
  240. <div class="name">
  241. 设置
  242. </div>
  243. <div class="code-name">.icon-shezhi
  244. </div>
  245. </li>
  246. <li class="dib">
  247. <span class="icon iconfont icon-weiguiguanli"></span>
  248. <div class="name">
  249. 违规管理
  250. </div>
  251. <div class="code-name">.icon-weiguiguanli
  252. </div>
  253. </li>
  254. <li class="dib">
  255. <span class="icon iconfont icon-wifi"></span>
  256. <div class="name">
  257. wifi
  258. </div>
  259. <div class="code-name">.icon-wifi
  260. </div>
  261. </li>
  262. <li class="dib">
  263. <span class="icon iconfont icon-yingyongcelve"></span>
  264. <div class="name">
  265. 应用策略
  266. </div>
  267. <div class="code-name">.icon-yingyongcelve
  268. </div>
  269. </li>
  270. <li class="dib">
  271. <span class="icon iconfont icon-guanzhu-yiguanzhu"></span>
  272. <div class="name">
  273. 关注-已关注
  274. </div>
  275. <div class="code-name">.icon-guanzhu-yiguanzhu
  276. </div>
  277. </li>
  278. <li class="dib">
  279. <span class="icon iconfont icon-ding-mianxing"></span>
  280. <div class="name">
  281. 钉-面型
  282. </div>
  283. <div class="code-name">.icon-ding-mianxing
  284. </div>
  285. </li>
  286. <li class="dib">
  287. <span class="icon iconfont icon-yanzhengma"></span>
  288. <div class="name">
  289. 验证码
  290. </div>
  291. <div class="code-name">.icon-yanzhengma
  292. </div>
  293. </li>
  294. <li class="dib">
  295. <span class="icon iconfont icon-morentouxiang"></span>
  296. <div class="name">
  297. 默认头像
  298. </div>
  299. <div class="code-name">.icon-morentouxiang
  300. </div>
  301. </li>
  302. <li class="dib">
  303. <span class="icon iconfont icon-jiantou"></span>
  304. <div class="name">
  305. 箭头
  306. </div>
  307. <div class="code-name">.icon-jiantou
  308. </div>
  309. </li>
  310. <li class="dib">
  311. <span class="icon iconfont icon-shixin-dianliang-dianliang10"></span>
  312. <div class="name">
  313. 电量
  314. </div>
  315. <div class="code-name">.icon-shixin-dianliang-dianliang10
  316. </div>
  317. </li>
  318. <li class="dib">
  319. <span class="icon iconfont icon-weibiaoti--"></span>
  320. <div class="name">
  321. gengxin
  322. </div>
  323. <div class="code-name">.icon-weibiaoti--
  324. </div>
  325. </li>
  326. <li class="dib">
  327. <span class="icon iconfont icon-shouji"></span>
  328. <div class="name">
  329. 手机
  330. </div>
  331. <div class="code-name">.icon-shouji
  332. </div>
  333. </li>
  334. <li class="dib">
  335. <span class="icon iconfont icon-anzhuoandroid"></span>
  336. <div class="name">
  337. 安卓android
  338. </div>
  339. <div class="code-name">.icon-anzhuoandroid
  340. </div>
  341. </li>
  342. <li class="dib">
  343. <span class="icon iconfont icon-liuliang"></span>
  344. <div class="name">
  345. 数量流量
  346. </div>
  347. <div class="code-name">.icon-liuliang
  348. </div>
  349. </li>
  350. <li class="dib">
  351. <span class="icon iconfont icon-USB"></span>
  352. <div class="name">
  353. USB
  354. </div>
  355. <div class="code-name">.icon-USB
  356. </div>
  357. </li>
  358. <li class="dib">
  359. <span class="icon iconfont icon-wifiguanbi"></span>
  360. <div class="name">
  361. wifi关闭
  362. </div>
  363. <div class="code-name">.icon-wifiguanbi
  364. </div>
  365. </li>
  366. <li class="dib">
  367. <span class="icon iconfont icon-fuzhi"></span>
  368. <div class="name">
  369. 复制
  370. </div>
  371. <div class="code-name">.icon-fuzhi
  372. </div>
  373. </li>
  374. <li class="dib">
  375. <span class="icon iconfont icon-icon-OTG"></span>
  376. <div class="name">
  377. icon-OTG
  378. </div>
  379. <div class="code-name">.icon-icon-OTG
  380. </div>
  381. </li>
  382. <li class="dib">
  383. <span class="icon iconfont icon-luyin"></span>
  384. <div class="name">
  385. 录音
  386. </div>
  387. <div class="code-name">.icon-luyin
  388. </div>
  389. </li>
  390. <li class="dib">
  391. <span class="icon iconfont icon-lanya"></span>
  392. <div class="name">
  393. 蓝牙
  394. </div>
  395. <div class="code-name">.icon-lanya
  396. </div>
  397. </li>
  398. <li class="dib">
  399. <span class="icon iconfont icon-sdka-09"></span>
  400. <div class="name">
  401. sd卡
  402. </div>
  403. <div class="code-name">.icon-sdka-09
  404. </div>
  405. </li>
  406. <li class="dib">
  407. <span class="icon iconfont icon-ball-camera"></span>
  408. <div class="name">
  409. 摄像头
  410. </div>
  411. <div class="code-name">.icon-ball-camera
  412. </div>
  413. </li>
  414. <li class="dib">
  415. <span class="icon iconfont icon-dianhuaduanxin_line"></span>
  416. <div class="name">
  417. 电话短信_line
  418. </div>
  419. <div class="code-name">.icon-dianhuaduanxin_line
  420. </div>
  421. </li>
  422. <li class="dib">
  423. <span class="icon iconfont icon-bx-wifi-2"></span>
  424. <div class="name">
  425. bx-wifi-2
  426. </div>
  427. <div class="code-name">.icon-bx-wifi-2
  428. </div>
  429. </li>
  430. <li class="dib">
  431. <span class="icon iconfont icon-GPSxinxi"></span>
  432. <div class="name">
  433. GPS信息
  434. </div>
  435. <div class="code-name">.icon-GPSxinxi
  436. </div>
  437. </li>
  438. <li class="dib">
  439. <span class="icon iconfont icon-wifi_fiber"></span>
  440. <div class="name">
  441. wifi_fiber
  442. </div>
  443. <div class="code-name">.icon-wifi_fiber
  444. </div>
  445. </li>
  446. </ul>
  447. <div class="article markdown">
  448. <h2 id="font-class-">font-class 引用</h2>
  449. <hr>
  450. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  451. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  452. <ul>
  453. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  454. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  455. </ul>
  456. <p>使用步骤如下:</p>
  457. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  458. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  459. </code></pre>
  460. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  461. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  462. </code></pre>
  463. <blockquote>
  464. <p>"
  465. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  466. </blockquote>
  467. </div>
  468. </div>
  469. <div class="content symbol">
  470. <ul class="icon_lists dib-box">
  471. <li class="dib">
  472. <svg class="icon svg-icon" aria-hidden="true">
  473. <use xlink:href="#icon-shijian"></use>
  474. </svg>
  475. <div class="name">时间</div>
  476. <div class="code-name">#icon-shijian</div>
  477. </li>
  478. <li class="dib">
  479. <svg class="icon svg-icon" aria-hidden="true">
  480. <use xlink:href="#icon-shezhi"></use>
  481. </svg>
  482. <div class="name">设置</div>
  483. <div class="code-name">#icon-shezhi</div>
  484. </li>
  485. <li class="dib">
  486. <svg class="icon svg-icon" aria-hidden="true">
  487. <use xlink:href="#icon-weiguiguanli"></use>
  488. </svg>
  489. <div class="name">违规管理</div>
  490. <div class="code-name">#icon-weiguiguanli</div>
  491. </li>
  492. <li class="dib">
  493. <svg class="icon svg-icon" aria-hidden="true">
  494. <use xlink:href="#icon-wifi"></use>
  495. </svg>
  496. <div class="name">wifi</div>
  497. <div class="code-name">#icon-wifi</div>
  498. </li>
  499. <li class="dib">
  500. <svg class="icon svg-icon" aria-hidden="true">
  501. <use xlink:href="#icon-yingyongcelve"></use>
  502. </svg>
  503. <div class="name">应用策略</div>
  504. <div class="code-name">#icon-yingyongcelve</div>
  505. </li>
  506. <li class="dib">
  507. <svg class="icon svg-icon" aria-hidden="true">
  508. <use xlink:href="#icon-guanzhu-yiguanzhu"></use>
  509. </svg>
  510. <div class="name">关注-已关注</div>
  511. <div class="code-name">#icon-guanzhu-yiguanzhu</div>
  512. </li>
  513. <li class="dib">
  514. <svg class="icon svg-icon" aria-hidden="true">
  515. <use xlink:href="#icon-ding-mianxing"></use>
  516. </svg>
  517. <div class="name">钉-面型</div>
  518. <div class="code-name">#icon-ding-mianxing</div>
  519. </li>
  520. <li class="dib">
  521. <svg class="icon svg-icon" aria-hidden="true">
  522. <use xlink:href="#icon-yanzhengma"></use>
  523. </svg>
  524. <div class="name">验证码</div>
  525. <div class="code-name">#icon-yanzhengma</div>
  526. </li>
  527. <li class="dib">
  528. <svg class="icon svg-icon" aria-hidden="true">
  529. <use xlink:href="#icon-morentouxiang"></use>
  530. </svg>
  531. <div class="name">默认头像</div>
  532. <div class="code-name">#icon-morentouxiang</div>
  533. </li>
  534. <li class="dib">
  535. <svg class="icon svg-icon" aria-hidden="true">
  536. <use xlink:href="#icon-jiantou"></use>
  537. </svg>
  538. <div class="name">箭头</div>
  539. <div class="code-name">#icon-jiantou</div>
  540. </li>
  541. <li class="dib">
  542. <svg class="icon svg-icon" aria-hidden="true">
  543. <use xlink:href="#icon-shixin-dianliang-dianliang10"></use>
  544. </svg>
  545. <div class="name">电量</div>
  546. <div class="code-name">#icon-shixin-dianliang-dianliang10</div>
  547. </li>
  548. <li class="dib">
  549. <svg class="icon svg-icon" aria-hidden="true">
  550. <use xlink:href="#icon-weibiaoti--"></use>
  551. </svg>
  552. <div class="name">gengxin</div>
  553. <div class="code-name">#icon-weibiaoti--</div>
  554. </li>
  555. <li class="dib">
  556. <svg class="icon svg-icon" aria-hidden="true">
  557. <use xlink:href="#icon-shouji"></use>
  558. </svg>
  559. <div class="name">手机</div>
  560. <div class="code-name">#icon-shouji</div>
  561. </li>
  562. <li class="dib">
  563. <svg class="icon svg-icon" aria-hidden="true">
  564. <use xlink:href="#icon-anzhuoandroid"></use>
  565. </svg>
  566. <div class="name">安卓android</div>
  567. <div class="code-name">#icon-anzhuoandroid</div>
  568. </li>
  569. <li class="dib">
  570. <svg class="icon svg-icon" aria-hidden="true">
  571. <use xlink:href="#icon-liuliang"></use>
  572. </svg>
  573. <div class="name">数量流量</div>
  574. <div class="code-name">#icon-liuliang</div>
  575. </li>
  576. <li class="dib">
  577. <svg class="icon svg-icon" aria-hidden="true">
  578. <use xlink:href="#icon-USB"></use>
  579. </svg>
  580. <div class="name">USB</div>
  581. <div class="code-name">#icon-USB</div>
  582. </li>
  583. <li class="dib">
  584. <svg class="icon svg-icon" aria-hidden="true">
  585. <use xlink:href="#icon-wifiguanbi"></use>
  586. </svg>
  587. <div class="name">wifi关闭</div>
  588. <div class="code-name">#icon-wifiguanbi</div>
  589. </li>
  590. <li class="dib">
  591. <svg class="icon svg-icon" aria-hidden="true">
  592. <use xlink:href="#icon-fuzhi"></use>
  593. </svg>
  594. <div class="name">复制</div>
  595. <div class="code-name">#icon-fuzhi</div>
  596. </li>
  597. <li class="dib">
  598. <svg class="icon svg-icon" aria-hidden="true">
  599. <use xlink:href="#icon-icon-OTG"></use>
  600. </svg>
  601. <div class="name">icon-OTG</div>
  602. <div class="code-name">#icon-icon-OTG</div>
  603. </li>
  604. <li class="dib">
  605. <svg class="icon svg-icon" aria-hidden="true">
  606. <use xlink:href="#icon-luyin"></use>
  607. </svg>
  608. <div class="name">录音</div>
  609. <div class="code-name">#icon-luyin</div>
  610. </li>
  611. <li class="dib">
  612. <svg class="icon svg-icon" aria-hidden="true">
  613. <use xlink:href="#icon-lanya"></use>
  614. </svg>
  615. <div class="name">蓝牙</div>
  616. <div class="code-name">#icon-lanya</div>
  617. </li>
  618. <li class="dib">
  619. <svg class="icon svg-icon" aria-hidden="true">
  620. <use xlink:href="#icon-sdka-09"></use>
  621. </svg>
  622. <div class="name">sd卡</div>
  623. <div class="code-name">#icon-sdka-09</div>
  624. </li>
  625. <li class="dib">
  626. <svg class="icon svg-icon" aria-hidden="true">
  627. <use xlink:href="#icon-ball-camera"></use>
  628. </svg>
  629. <div class="name">摄像头</div>
  630. <div class="code-name">#icon-ball-camera</div>
  631. </li>
  632. <li class="dib">
  633. <svg class="icon svg-icon" aria-hidden="true">
  634. <use xlink:href="#icon-dianhuaduanxin_line"></use>
  635. </svg>
  636. <div class="name">电话短信_line</div>
  637. <div class="code-name">#icon-dianhuaduanxin_line</div>
  638. </li>
  639. <li class="dib">
  640. <svg class="icon svg-icon" aria-hidden="true">
  641. <use xlink:href="#icon-bx-wifi-2"></use>
  642. </svg>
  643. <div class="name">bx-wifi-2</div>
  644. <div class="code-name">#icon-bx-wifi-2</div>
  645. </li>
  646. <li class="dib">
  647. <svg class="icon svg-icon" aria-hidden="true">
  648. <use xlink:href="#icon-GPSxinxi"></use>
  649. </svg>
  650. <div class="name">GPS信息</div>
  651. <div class="code-name">#icon-GPSxinxi</div>
  652. </li>
  653. <li class="dib">
  654. <svg class="icon svg-icon" aria-hidden="true">
  655. <use xlink:href="#icon-wifi_fiber"></use>
  656. </svg>
  657. <div class="name">wifi_fiber</div>
  658. <div class="code-name">#icon-wifi_fiber</div>
  659. </li>
  660. </ul>
  661. <div class="article markdown">
  662. <h2 id="symbol-">Symbol 引用</h2>
  663. <hr>
  664. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  665. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  666. <ul>
  667. <li>支持多色图标了,不再受单色限制。</li>
  668. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  669. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  670. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  671. </ul>
  672. <p>使用步骤如下:</p>
  673. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  674. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  675. </code></pre>
  676. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  677. <pre><code class="language-html">&lt;style&gt;
  678. .icon {
  679. width: 1em;
  680. height: 1em;
  681. vertical-align: -0.15em;
  682. fill: currentColor;
  683. overflow: hidden;
  684. }
  685. &lt;/style&gt;
  686. </code></pre>
  687. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  688. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  689. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  690. &lt;/svg&gt;
  691. </code></pre>
  692. </div>
  693. </div>
  694. </div>
  695. </div>
  696. <script>
  697. $(document).ready(function () {
  698. $('.tab-container .content:first').show()
  699. $('#tabs li').click(function (e) {
  700. var tabContent = $('.tab-container .content')
  701. var index = $(this).index()
  702. if ($(this).hasClass('active')) {
  703. return
  704. } else {
  705. $('#tabs li').removeClass('active')
  706. $(this).addClass('active')
  707. tabContent.hide().eq(index).fadeIn()
  708. }
  709. })
  710. })
  711. </script>
  712. </body>
  713. </html>