sso

demo_symbol.html 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>IconFont</title>
  6. <link rel="stylesheet" href="demo.css">
  7. <script src="iconfont.js"></script>
  8. <style type="text/css">
  9. .icon {
  10. /* 通过设置 font-size 来改变图标大小 */
  11. width: 1em; height: 1em;
  12. /* 图标和文字相邻时,垂直对齐 */
  13. vertical-align: -0.15em;
  14. /* 通过设置 color 来改变 SVG 的颜色/fill */
  15. fill: currentColor;
  16. /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
  17. normalize.css 中也包含这行 */
  18. overflow: hidden;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div class="main markdown">
  24. <h1>IconFont 图标</h1>
  25. <ul class="icon_lists clear">
  26. <li>
  27. <svg class="icon" aria-hidden="true">
  28. <use xlink:href="#icon-wsmp-payuser"></use>
  29. </svg>
  30. <div class="name">会员</div>
  31. <div class="fontclass">#icon-wsmp-payuser</div>
  32. </li>
  33. <li>
  34. <svg class="icon" aria-hidden="true">
  35. <use xlink:href="#icon-jiankangshuidi"></use>
  36. </svg>
  37. <div class="name">健康 水滴</div>
  38. <div class="fontclass">#icon-jiankangshuidi</div>
  39. </li>
  40. <li>
  41. <svg class="icon" aria-hidden="true">
  42. <use xlink:href="#icon-iconbaocuo"></use>
  43. </svg>
  44. <div class="name">报错</div>
  45. <div class="fontclass">#icon-iconbaocuo</div>
  46. </li>
  47. <li>
  48. <svg class="icon" aria-hidden="true">
  49. <use xlink:href="#icon-morentouxiang"></use>
  50. </svg>
  51. <div class="name">225默认头像</div>
  52. <div class="fontclass">#icon-morentouxiang</div>
  53. </li>
  54. <li>
  55. <svg class="icon" aria-hidden="true">
  56. <use xlink:href="#icon-accessory"></use>
  57. </svg>
  58. <div class="name">accessory</div>
  59. <div class="fontclass">#icon-accessory</div>
  60. </li>
  61. <li>
  62. <svg class="icon" aria-hidden="true">
  63. <use xlink:href="#icon-add"></use>
  64. </svg>
  65. <div class="name">add</div>
  66. <div class="fontclass">#icon-add</div>
  67. </li>
  68. <li>
  69. <svg class="icon" aria-hidden="true">
  70. <use xlink:href="#icon-addition_fill"></use>
  71. </svg>
  72. <div class="name">addition_fill</div>
  73. <div class="fontclass">#icon-addition_fill</div>
  74. </li>
  75. <li>
  76. <svg class="icon" aria-hidden="true">
  77. <use xlink:href="#icon-addition"></use>
  78. </svg>
  79. <div class="name">addition</div>
  80. <div class="fontclass">#icon-addition</div>
  81. </li>
  82. <li>
  83. <svg class="icon" aria-hidden="true">
  84. <use xlink:href="#icon-addressbook_fill"></use>
  85. </svg>
  86. <div class="name">addressbook_fill</div>
  87. <div class="fontclass">#icon-addressbook_fill</div>
  88. </li>
  89. <li>
  90. <svg class="icon" aria-hidden="true">
  91. <use xlink:href="#icon-addressbook"></use>
  92. </svg>
  93. <div class="name">addressbook</div>
  94. <div class="fontclass">#icon-addressbook</div>
  95. </li>
  96. <li>
  97. <svg class="icon" aria-hidden="true">
  98. <use xlink:href="#icon-browse_fill"></use>
  99. </svg>
  100. <div class="name">browse_fill</div>
  101. <div class="fontclass">#icon-browse_fill</div>
  102. </li>
  103. <li>
  104. <svg class="icon" aria-hidden="true">
  105. <use xlink:href="#icon-brush"></use>
  106. </svg>
  107. <div class="name">brush</div>
  108. <div class="fontclass">#icon-brush</div>
  109. </li>
  110. <li>
  111. <svg class="icon" aria-hidden="true">
  112. <use xlink:href="#icon-brush_fill"></use>
  113. </svg>
  114. <div class="name">brush_fill</div>
  115. <div class="fontclass">#icon-brush_fill</div>
  116. </li>
  117. <li>
  118. <svg class="icon" aria-hidden="true">
  119. <use xlink:href="#icon-computer_fill"></use>
  120. </svg>
  121. <div class="name">computer_fill</div>
  122. <div class="fontclass">#icon-computer_fill</div>
  123. </li>
  124. <li>
  125. <svg class="icon" aria-hidden="true">
  126. <use xlink:href="#icon-computer"></use>
  127. </svg>
  128. <div class="name">computer</div>
  129. <div class="fontclass">#icon-computer</div>
  130. </li>
  131. <li>
  132. <svg class="icon" aria-hidden="true">
  133. <use xlink:href="#icon-coordinates_fill"></use>
  134. </svg>
  135. <div class="name">coordinates_fill</div>
  136. <div class="fontclass">#icon-coordinates_fill</div>
  137. </li>
  138. <li>
  139. <svg class="icon" aria-hidden="true">
  140. <use xlink:href="#icon-coordinates"></use>
  141. </svg>
  142. <div class="name">coordinates</div>
  143. <div class="fontclass">#icon-coordinates</div>
  144. </li>
  145. <li>
  146. <svg class="icon" aria-hidden="true">
  147. <use xlink:href="#icon-coupons_fill"></use>
  148. </svg>
  149. <div class="name">coupons_fill</div>
  150. <div class="fontclass">#icon-coupons_fill</div>
  151. </li>
  152. <li>
  153. <svg class="icon" aria-hidden="true">
  154. <use xlink:href="#icon-customerservice_fill"></use>
  155. </svg>
  156. <div class="name">customerservice_fill</div>
  157. <div class="fontclass">#icon-customerservice_fill</div>
  158. </li>
  159. <li>
  160. <svg class="icon" aria-hidden="true">
  161. <use xlink:href="#icon-customerservice"></use>
  162. </svg>
  163. <div class="name">customerservice</div>
  164. <div class="fontclass">#icon-customerservice</div>
  165. </li>
  166. <li>
  167. <svg class="icon" aria-hidden="true">
  168. <use xlink:href="#icon-document"></use>
  169. </svg>
  170. <div class="name">document</div>
  171. <div class="fontclass">#icon-document</div>
  172. </li>
  173. <li>
  174. <svg class="icon" aria-hidden="true">
  175. <use xlink:href="#icon-document_fill"></use>
  176. </svg>
  177. <div class="name">document_fill</div>
  178. <div class="fontclass">#icon-document_fill</div>
  179. </li>
  180. <li>
  181. <svg class="icon" aria-hidden="true">
  182. <use xlink:href="#icon-dynamic_fill"></use>
  183. </svg>
  184. <div class="name">dynamic_fill</div>
  185. <div class="fontclass">#icon-dynamic_fill</div>
  186. </li>
  187. <li>
  188. <svg class="icon" aria-hidden="true">
  189. <use xlink:href="#icon-editor"></use>
  190. </svg>
  191. <div class="name">editor</div>
  192. <div class="fontclass">#icon-editor</div>
  193. </li>
  194. <li>
  195. <svg class="icon" aria-hidden="true">
  196. <use xlink:href="#icon-emoji"></use>
  197. </svg>
  198. <div class="name">emoji</div>
  199. <div class="fontclass">#icon-emoji</div>
  200. </li>
  201. <li>
  202. <svg class="icon" aria-hidden="true">
  203. <use xlink:href="#icon-enter"></use>
  204. </svg>
  205. <div class="name">enter</div>
  206. <div class="fontclass">#icon-enter</div>
  207. </li>
  208. <li>
  209. <svg class="icon" aria-hidden="true">
  210. <use xlink:href="#icon-flag_fill"></use>
  211. </svg>
  212. <div class="name">flag_fill</div>
  213. <div class="fontclass">#icon-flag_fill</div>
  214. </li>
  215. <li>
  216. <svg class="icon" aria-hidden="true">
  217. <use xlink:href="#icon-flag"></use>
  218. </svg>
  219. <div class="name">flag</div>
  220. <div class="fontclass">#icon-flag</div>
  221. </li>
  222. <li>
  223. <svg class="icon" aria-hidden="true">
  224. <use xlink:href="#icon-group_fill"></use>
  225. </svg>
  226. <div class="name">group_fill</div>
  227. <div class="fontclass">#icon-group_fill</div>
  228. </li>
  229. <li>
  230. <svg class="icon" aria-hidden="true">
  231. <use xlink:href="#icon-headlines_fill"></use>
  232. </svg>
  233. <div class="name">headlines_fill</div>
  234. <div class="fontclass">#icon-headlines_fill</div>
  235. </li>
  236. <li>
  237. <svg class="icon" aria-hidden="true">
  238. <use xlink:href="#icon-homepage_fill"></use>
  239. </svg>
  240. <div class="name">homepage_fill</div>
  241. <div class="fontclass">#icon-homepage_fill</div>
  242. </li>
  243. <li>
  244. <svg class="icon" aria-hidden="true">
  245. <use xlink:href="#icon-homepage"></use>
  246. </svg>
  247. <div class="name">homepage</div>
  248. <div class="fontclass">#icon-homepage</div>
  249. </li>
  250. <li>
  251. <svg class="icon" aria-hidden="true">
  252. <use xlink:href="#icon-interactive_fill"></use>
  253. </svg>
  254. <div class="name">interactive_fill</div>
  255. <div class="fontclass">#icon-interactive_fill</div>
  256. </li>
  257. <li>
  258. <svg class="icon" aria-hidden="true">
  259. <use xlink:href="#icon-interactive"></use>
  260. </svg>
  261. <div class="name">interactive</div>
  262. <div class="fontclass">#icon-interactive</div>
  263. </li>
  264. <li>
  265. <svg class="icon" aria-hidden="true">
  266. <use xlink:href="#icon-label"></use>
  267. </svg>
  268. <div class="name">label</div>
  269. <div class="fontclass">#icon-label</div>
  270. </li>
  271. <li>
  272. <svg class="icon" aria-hidden="true">
  273. <use xlink:href="#icon-like_fill"></use>
  274. </svg>
  275. <div class="name">like_fill</div>
  276. <div class="fontclass">#icon-like_fill</div>
  277. </li>
  278. <li>
  279. <svg class="icon" aria-hidden="true">
  280. <use xlink:href="#icon-like"></use>
  281. </svg>
  282. <div class="name">like</div>
  283. <div class="fontclass">#icon-like</div>
  284. </li>
  285. <li>
  286. <svg class="icon" aria-hidden="true">
  287. <use xlink:href="#icon-lock"></use>
  288. </svg>
  289. <div class="name">lock</div>
  290. <div class="fontclass">#icon-lock</div>
  291. </li>
  292. <li>
  293. <svg class="icon" aria-hidden="true">
  294. <use xlink:href="#icon-mail"></use>
  295. </svg>
  296. <div class="name">mail</div>
  297. <div class="fontclass">#icon-mail</div>
  298. </li>
  299. <li>
  300. <svg class="icon" aria-hidden="true">
  301. <use xlink:href="#icon-manage"></use>
  302. </svg>
  303. <div class="name">manage</div>
  304. <div class="fontclass">#icon-manage</div>
  305. </li>
  306. <li>
  307. <svg class="icon" aria-hidden="true">
  308. <use xlink:href="#icon-message"></use>
  309. </svg>
  310. <div class="name">message</div>
  311. <div class="fontclass">#icon-message</div>
  312. </li>
  313. <li>
  314. <svg class="icon" aria-hidden="true">
  315. <use xlink:href="#icon-mine_fill"></use>
  316. </svg>
  317. <div class="name">mine_fill</div>
  318. <div class="fontclass">#icon-mine_fill</div>
  319. </li>
  320. <li>
  321. <svg class="icon" aria-hidden="true">
  322. <use xlink:href="#icon-mobilephone_fill"></use>
  323. </svg>
  324. <div class="name">mobilephone_fill</div>
  325. <div class="fontclass">#icon-mobilephone_fill</div>
  326. </li>
  327. <li>
  328. <svg class="icon" aria-hidden="true">
  329. <use xlink:href="#icon-mobilephone"></use>
  330. </svg>
  331. <div class="name">mobilephone</div>
  332. <div class="fontclass">#icon-mobilephone</div>
  333. </li>
  334. <li>
  335. <svg class="icon" aria-hidden="true">
  336. <use xlink:href="#icon-offline_fill"></use>
  337. </svg>
  338. <div class="name">offline_fill</div>
  339. <div class="fontclass">#icon-offline_fill</div>
  340. </li>
  341. <li>
  342. <svg class="icon" aria-hidden="true">
  343. <use xlink:href="#icon-offline"></use>
  344. </svg>
  345. <div class="name">offline</div>
  346. <div class="fontclass">#icon-offline</div>
  347. </li>
  348. <li>
  349. <svg class="icon" aria-hidden="true">
  350. <use xlink:href="#icon-order_fill"></use>
  351. </svg>
  352. <div class="name">order_fill</div>
  353. <div class="fontclass">#icon-order_fill</div>
  354. </li>
  355. <li>
  356. <svg class="icon" aria-hidden="true">
  357. <use xlink:href="#icon-other"></use>
  358. </svg>
  359. <div class="name">other</div>
  360. <div class="fontclass">#icon-other</div>
  361. </li>
  362. <li>
  363. <svg class="icon" aria-hidden="true">
  364. <use xlink:href="#icon-picture_fill"></use>
  365. </svg>
  366. <div class="name">picture_fill</div>
  367. <div class="fontclass">#icon-picture_fill</div>
  368. </li>
  369. <li>
  370. <svg class="icon" aria-hidden="true">
  371. <use xlink:href="#icon-prompt_fill"></use>
  372. </svg>
  373. <div class="name">prompt_fill</div>
  374. <div class="fontclass">#icon-prompt_fill</div>
  375. </li>
  376. <li>
  377. <svg class="icon" aria-hidden="true">
  378. <use xlink:href="#icon-qrcode_fill"></use>
  379. </svg>
  380. <div class="name">qrcode_fill</div>
  381. <div class="fontclass">#icon-qrcode_fill</div>
  382. </li>
  383. <li>
  384. <svg class="icon" aria-hidden="true">
  385. <use xlink:href="#icon-remind_fill"></use>
  386. </svg>
  387. <div class="name">remind_fill</div>
  388. <div class="fontclass">#icon-remind_fill</div>
  389. </li>
  390. <li>
  391. <svg class="icon" aria-hidden="true">
  392. <use xlink:href="#icon-remind"></use>
  393. </svg>
  394. <div class="name">remind</div>
  395. <div class="fontclass">#icon-remind</div>
  396. </li>
  397. <li>
  398. <svg class="icon" aria-hidden="true">
  399. <use xlink:href="#icon-return"></use>
  400. </svg>
  401. <div class="name">return</div>
  402. <div class="fontclass">#icon-return</div>
  403. </li>
  404. <li>
  405. <svg class="icon" aria-hidden="true">
  406. <use xlink:href="#icon-service_fill"></use>
  407. </svg>
  408. <div class="name">service_fill</div>
  409. <div class="fontclass">#icon-service_fill</div>
  410. </li>
  411. <li>
  412. <svg class="icon" aria-hidden="true">
  413. <use xlink:href="#icon-service"></use>
  414. </svg>
  415. <div class="name">service</div>
  416. <div class="fontclass">#icon-service</div>
  417. </li>
  418. <li>
  419. <svg class="icon" aria-hidden="true">
  420. <use xlink:href="#icon-setup_fill"></use>
  421. </svg>
  422. <div class="name">setup_fill</div>
  423. <div class="fontclass">#icon-setup_fill</div>
  424. </li>
  425. <li>
  426. <svg class="icon" aria-hidden="true">
  427. <use xlink:href="#icon-setup"></use>
  428. </svg>
  429. <div class="name">setup</div>
  430. <div class="fontclass">#icon-setup</div>
  431. </li>
  432. <li>
  433. <svg class="icon" aria-hidden="true">
  434. <use xlink:href="#icon-smallscreen"></use>
  435. </svg>
  436. <div class="name">smallscreen</div>
  437. <div class="fontclass">#icon-smallscreen</div>
  438. </li>
  439. <li>
  440. <svg class="icon" aria-hidden="true">
  441. <use xlink:href="#icon-success_fill"></use>
  442. </svg>
  443. <div class="name">success_fill</div>
  444. <div class="fontclass">#icon-success_fill</div>
  445. </li>
  446. <li>
  447. <svg class="icon" aria-hidden="true">
  448. <use xlink:href="#icon-success"></use>
  449. </svg>
  450. <div class="name">success</div>
  451. <div class="fontclass">#icon-success</div>
  452. </li>
  453. <li>
  454. <svg class="icon" aria-hidden="true">
  455. <use xlink:href="#icon-time_fill"></use>
  456. </svg>
  457. <div class="name">time_fill</div>
  458. <div class="fontclass">#icon-time_fill</div>
  459. </li>
  460. <li>
  461. <svg class="icon" aria-hidden="true">
  462. <use xlink:href="#icon-trash"></use>
  463. </svg>
  464. <div class="name">trash</div>
  465. <div class="fontclass">#icon-trash</div>
  466. </li>
  467. <li>
  468. <svg class="icon" aria-hidden="true">
  469. <use xlink:href="#icon-trash_fill"></use>
  470. </svg>
  471. <div class="name">trash_fill</div>
  472. <div class="fontclass">#icon-trash_fill</div>
  473. </li>
  474. <li>
  475. <svg class="icon" aria-hidden="true">
  476. <use xlink:href="#icon-undo"></use>
  477. </svg>
  478. <div class="name">undo</div>
  479. <div class="fontclass">#icon-undo</div>
  480. </li>
  481. <li>
  482. <svg class="icon" aria-hidden="true">
  483. <use xlink:href="#icon-workbench_fill"></use>
  484. </svg>
  485. <div class="name">workbench_fill</div>
  486. <div class="fontclass">#icon-workbench_fill</div>
  487. </li>
  488. <li>
  489. <svg class="icon" aria-hidden="true">
  490. <use xlink:href="#icon-daoru"></use>
  491. </svg>
  492. <div class="name">导入</div>
  493. <div class="fontclass">#icon-daoru</div>
  494. </li>
  495. <li>
  496. <svg class="icon" aria-hidden="true">
  497. <use xlink:href="#icon-search"></use>
  498. </svg>
  499. <div class="name">search</div>
  500. <div class="fontclass">#icon-search</div>
  501. </li>
  502. <li>
  503. <svg class="icon" aria-hidden="true">
  504. <use xlink:href="#icon-packup"></use>
  505. </svg>
  506. <div class="name">packup</div>
  507. <div class="fontclass">#icon-packup</div>
  508. </li>
  509. <li>
  510. <svg class="icon" aria-hidden="true">
  511. <use xlink:href="#icon-unfold"></use>
  512. </svg>
  513. <div class="name">unfold</div>
  514. <div class="fontclass">#icon-unfold</div>
  515. </li>
  516. <li>
  517. <svg class="icon" aria-hidden="true">
  518. <use xlink:href="#icon-wangwang"></use>
  519. </svg>
  520. <div class="name">wangwang_fill</div>
  521. <div class="fontclass">#icon-wangwang</div>
  522. </li>
  523. <li>
  524. <svg class="icon" aria-hidden="true">
  525. <use xlink:href="#icon-yanzhengma"></use>
  526. </svg>
  527. <div class="name">验证码</div>
  528. <div class="fontclass">#icon-yanzhengma</div>
  529. </li>
  530. <li>
  531. <svg class="icon" aria-hidden="true">
  532. <use xlink:href="#icon-baocuo-chahua"></use>
  533. </svg>
  534. <div class="name">报错-插画</div>
  535. <div class="fontclass">#icon-baocuo-chahua</div>
  536. </li>
  537. <li>
  538. <svg class="icon" aria-hidden="true">
  539. <use xlink:href="#icon-pengyou"></use>
  540. </svg>
  541. <div class="name">朋友</div>
  542. <div class="fontclass">#icon-pengyou</div>
  543. </li>
  544. <li>
  545. <svg class="icon" aria-hidden="true">
  546. <use xlink:href="#icon-suoyou"></use>
  547. </svg>
  548. <div class="name">所有</div>
  549. <div class="fontclass">#icon-suoyou</div>
  550. </li>
  551. <li>
  552. <svg class="icon" aria-hidden="true">
  553. <use xlink:href="#icon-huiyuan"></use>
  554. </svg>
  555. <div class="name">会员</div>
  556. <div class="fontclass">#icon-huiyuan</div>
  557. </li>
  558. <li>
  559. <svg class="icon" aria-hidden="true">
  560. <use xlink:href="#icon-huiyuan1"></use>
  561. </svg>
  562. <div class="name">会员</div>
  563. <div class="fontclass">#icon-huiyuan1</div>
  564. </li>
  565. <li>
  566. <svg class="icon" aria-hidden="true">
  567. <use xlink:href="#icon-kongyemian"></use>
  568. </svg>
  569. <div class="name">空页面</div>
  570. <div class="fontclass">#icon-kongyemian</div>
  571. </li>
  572. <li>
  573. <svg class="icon" aria-hidden="true">
  574. <use xlink:href="#icon-logout"></use>
  575. </svg>
  576. <div class="name">logout</div>
  577. <div class="fontclass">#icon-logout</div>
  578. </li>
  579. <li>
  580. <svg class="icon" aria-hidden="true">
  581. <use xlink:href="#icon-cloudupload-o"></use>
  582. </svg>
  583. <div class="name">cloud upload-o</div>
  584. <div class="fontclass">#icon-cloudupload-o</div>
  585. </li>
  586. </ul>
  587. <h2 id="symbol-">symbol引用</h2>
  588. <hr>
  589. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  590. 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:</p>
  591. <ul>
  592. <li>支持多色图标了,不再受单色限制。</li>
  593. <li>通过一些技巧,支持像字体那样,通过<code>font-size</code>,<code>color</code>来调整样式。</li>
  594. <li>兼容性较差,支持 ie9+,及现代浏览器。</li>
  595. <li>浏览器渲染svg的性能一般,还不如png。</li>
  596. </ul>
  597. <p>使用步骤如下:</p>
  598. <h3 id="-symbol-">第一步:引入项目下面生成的symbol代码:</h3>
  599. <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
  600. <h3 id="-css-">第二步:加入通用css代码(引入一次就行):</h3>
  601. <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
  602. .icon {
  603. width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
  604. vertical-align: <span class="hljs-number">-0.15</span>em;
  605. fill: currentColor;
  606. overflow: hidden;
  607. }
  608. &lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
  609. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  610. <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  611. &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
  612. </span>&lt;<span class="hljs-regexp">/svg&gt;
  613. </span></code></pre>
  614. </div>
  615. </body>
  616. </html>