demo_index.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  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=4559910" 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">&#xe6b0;</span>
  53. <div class="name">编辑</div>
  54. <div class="code-name">&amp;#xe6b0;</div>
  55. </li>
  56. <li class="dib">
  57. <span class="icon iconfont">&#xe602;</span>
  58. <div class="name">全部订单</div>
  59. <div class="code-name">&amp;#xe602;</div>
  60. </li>
  61. <li class="dib">
  62. <span class="icon iconfont">&#xe7f5;</span>
  63. <div class="name">工具箱</div>
  64. <div class="code-name">&amp;#xe7f5;</div>
  65. </li>
  66. <li class="dib">
  67. <span class="icon iconfont">&#xe64a;</span>
  68. <div class="name">冰柜</div>
  69. <div class="code-name">&amp;#xe64a;</div>
  70. </li>
  71. <li class="dib">
  72. <span class="icon iconfont">&#xe608;</span>
  73. <div class="name">保温箱管理</div>
  74. <div class="code-name">&amp;#xe608;</div>
  75. </li>
  76. <li class="dib">
  77. <span class="icon iconfont">&#xe717;</span>
  78. <div class="name">冰排管理</div>
  79. <div class="code-name">&amp;#xe717;</div>
  80. </li>
  81. <li class="dib">
  82. <span class="icon iconfont">&#xe9e7;</span>
  83. <div class="name">冰排出库</div>
  84. <div class="code-name">&amp;#xe9e7;</div>
  85. </li>
  86. <li class="dib">
  87. <span class="icon iconfont">&#xe9e8;</span>
  88. <div class="name">冰排入库</div>
  89. <div class="code-name">&amp;#xe9e8;</div>
  90. </li>
  91. <li class="dib">
  92. <span class="icon iconfont">&#xe601;</span>
  93. <div class="name">地址簿</div>
  94. <div class="code-name">&amp;#xe601;</div>
  95. </li>
  96. <li class="dib">
  97. <span class="icon iconfont">&#xe63c;</span>
  98. <div class="name">展开</div>
  99. <div class="code-name">&amp;#xe63c;</div>
  100. </li>
  101. <li class="dib">
  102. <span class="icon iconfont">&#xe60a;</span>
  103. <div class="name">添加订单</div>
  104. <div class="code-name">&amp;#xe60a;</div>
  105. </li>
  106. <li class="dib">
  107. <span class="icon iconfont">&#xe749;</span>
  108. <div class="name">全部订单</div>
  109. <div class="code-name">&amp;#xe749;</div>
  110. </li>
  111. <li class="dib">
  112. <span class="icon iconfont">&#xe606;</span>
  113. <div class="name">logout</div>
  114. <div class="code-name">&amp;#xe606;</div>
  115. </li>
  116. <li class="dib">
  117. <span class="icon iconfont">&#xe609;</span>
  118. <div class="name">首页</div>
  119. <div class="code-name">&amp;#xe609;</div>
  120. </li>
  121. <li class="dib">
  122. <span class="icon iconfont">&#xe66f;</span>
  123. <div class="name">扫一扫</div>
  124. <div class="code-name">&amp;#xe66f;</div>
  125. </li>
  126. <li class="dib">
  127. <span class="icon iconfont">&#xe6dc;</span>
  128. <div class="name">核销订单</div>
  129. <div class="code-name">&amp;#xe6dc;</div>
  130. </li>
  131. <li class="dib">
  132. <span class="icon iconfont">&#xe60e;</span>
  133. <div class="name">我的</div>
  134. <div class="code-name">&amp;#xe60e;</div>
  135. </li>
  136. <li class="dib">
  137. <span class="icon iconfont">&#xe616;</span>
  138. <div class="name">已取消</div>
  139. <div class="code-name">&amp;#xe616;</div>
  140. </li>
  141. <li class="dib">
  142. <span class="icon iconfont">&#xe607;</span>
  143. <div class="name">已送达</div>
  144. <div class="code-name">&amp;#xe607;</div>
  145. </li>
  146. <li class="dib">
  147. <span class="icon iconfont">&#xe83e;</span>
  148. <div class="name">配送中</div>
  149. <div class="code-name">&amp;#xe83e;</div>
  150. </li>
  151. <li class="dib">
  152. <span class="icon iconfont">&#xe62e;</span>
  153. <div class="name">物流信息-已下单</div>
  154. <div class="code-name">&amp;#xe62e;</div>
  155. </li>
  156. </ul>
  157. <div class="article markdown">
  158. <h2 id="unicode-">Unicode 引用</h2>
  159. <hr>
  160. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  161. <ul>
  162. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  163. <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
  164. </ul>
  165. <blockquote>
  166. <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
  167. </blockquote>
  168. <p>Unicode 使用步骤如下:</p>
  169. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  170. <pre><code class="language-css"
  171. >@font-face {
  172. font-family: 'iconfont';
  173. src: url('iconfont.woff2?t=1729654709312') format('woff2'),
  174. url('iconfont.woff?t=1729654709312') format('woff'),
  175. url('iconfont.ttf?t=1729654709312') format('truetype');
  176. }
  177. </code></pre>
  178. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  179. <pre><code class="language-css"
  180. >.iconfont {
  181. font-family: "iconfont" !important;
  182. font-size: 16px;
  183. font-style: normal;
  184. -webkit-font-smoothing: antialiased;
  185. -moz-osx-font-smoothing: grayscale;
  186. }
  187. </code></pre>
  188. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  189. <pre>
  190. <code class="language-html"
  191. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  192. </code></pre>
  193. <blockquote>
  194. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  195. </blockquote>
  196. </div>
  197. </div>
  198. <div class="content font-class">
  199. <ul class="icon_lists dib-box">
  200. <li class="dib">
  201. <span class="icon iconfont icon-bianji"></span>
  202. <div class="name">
  203. 编辑
  204. </div>
  205. <div class="code-name">.icon-bianji
  206. </div>
  207. </li>
  208. <li class="dib">
  209. <span class="icon iconfont icon-quanbudingdan"></span>
  210. <div class="name">
  211. 全部订单
  212. </div>
  213. <div class="code-name">.icon-quanbudingdan
  214. </div>
  215. </li>
  216. <li class="dib">
  217. <span class="icon iconfont icon-incubator"></span>
  218. <div class="name">
  219. 工具箱
  220. </div>
  221. <div class="code-name">.icon-incubator
  222. </div>
  223. </li>
  224. <li class="dib">
  225. <span class="icon iconfont icon-binggui"></span>
  226. <div class="name">
  227. 冰柜
  228. </div>
  229. <div class="code-name">.icon-binggui
  230. </div>
  231. </li>
  232. <li class="dib">
  233. <span class="icon iconfont icon-baowenxiangguanli"></span>
  234. <div class="name">
  235. 保温箱管理
  236. </div>
  237. <div class="code-name">.icon-baowenxiangguanli
  238. </div>
  239. </li>
  240. <li class="dib">
  241. <span class="icon iconfont icon-bingpaiguanli"></span>
  242. <div class="name">
  243. 冰排管理
  244. </div>
  245. <div class="code-name">.icon-bingpaiguanli
  246. </div>
  247. </li>
  248. <li class="dib">
  249. <span class="icon iconfont icon-bingpaichuku"></span>
  250. <div class="name">
  251. 冰排出库
  252. </div>
  253. <div class="code-name">.icon-bingpaichuku
  254. </div>
  255. </li>
  256. <li class="dib">
  257. <span class="icon iconfont icon-bingpairuku"></span>
  258. <div class="name">
  259. 冰排入库
  260. </div>
  261. <div class="code-name">.icon-bingpairuku
  262. </div>
  263. </li>
  264. <li class="dib">
  265. <span class="icon iconfont icon-dizhibu"></span>
  266. <div class="name">
  267. 地址簿
  268. </div>
  269. <div class="code-name">.icon-dizhibu
  270. </div>
  271. </li>
  272. <li class="dib">
  273. <span class="icon iconfont icon-zhankai1"></span>
  274. <div class="name">
  275. 展开
  276. </div>
  277. <div class="code-name">.icon-zhankai1
  278. </div>
  279. </li>
  280. <li class="dib">
  281. <span class="icon iconfont icon-tianjiadingdan"></span>
  282. <div class="name">
  283. 添加订单
  284. </div>
  285. <div class="code-name">.icon-tianjiadingdan
  286. </div>
  287. </li>
  288. <li class="dib">
  289. <span class="icon iconfont icon-dingdan"></span>
  290. <div class="name">
  291. 全部订单
  292. </div>
  293. <div class="code-name">.icon-dingdan
  294. </div>
  295. </li>
  296. <li class="dib">
  297. <span class="icon iconfont icon-tuichudenglu"></span>
  298. <div class="name">
  299. logout
  300. </div>
  301. <div class="code-name">.icon-tuichudenglu
  302. </div>
  303. </li>
  304. <li class="dib">
  305. <span class="icon iconfont icon-shouye"></span>
  306. <div class="name">
  307. 首页
  308. </div>
  309. <div class="code-name">.icon-shouye
  310. </div>
  311. </li>
  312. <li class="dib">
  313. <span class="icon iconfont icon-saoyisao"></span>
  314. <div class="name">
  315. 扫一扫
  316. </div>
  317. <div class="code-name">.icon-saoyisao
  318. </div>
  319. </li>
  320. <li class="dib">
  321. <span class="icon iconfont icon-qianshou"></span>
  322. <div class="name">
  323. 核销订单
  324. </div>
  325. <div class="code-name">.icon-qianshou
  326. </div>
  327. </li>
  328. <li class="dib">
  329. <span class="icon iconfont icon-wode"></span>
  330. <div class="name">
  331. 我的
  332. </div>
  333. <div class="code-name">.icon-wode
  334. </div>
  335. </li>
  336. <li class="dib">
  337. <span class="icon iconfont icon-yiquxiao"></span>
  338. <div class="name">
  339. 已取消
  340. </div>
  341. <div class="code-name">.icon-yiquxiao
  342. </div>
  343. </li>
  344. <li class="dib">
  345. <span class="icon iconfont icon-yisongda"></span>
  346. <div class="name">
  347. 已送达
  348. </div>
  349. <div class="code-name">.icon-yisongda
  350. </div>
  351. </li>
  352. <li class="dib">
  353. <span class="icon iconfont icon-delivery"></span>
  354. <div class="name">
  355. 配送中
  356. </div>
  357. <div class="code-name">.icon-delivery
  358. </div>
  359. </li>
  360. <li class="dib">
  361. <span class="icon iconfont icon-cancel"></span>
  362. <div class="name">
  363. 物流信息-已下单
  364. </div>
  365. <div class="code-name">.icon-cancel
  366. </div>
  367. </li>
  368. </ul>
  369. <div class="article markdown">
  370. <h2 id="font-class-">font-class 引用</h2>
  371. <hr>
  372. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  373. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  374. <ul>
  375. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  376. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  377. </ul>
  378. <p>使用步骤如下:</p>
  379. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  380. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  381. </code></pre>
  382. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  383. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  384. </code></pre>
  385. <blockquote>
  386. <p>"
  387. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  388. </blockquote>
  389. </div>
  390. </div>
  391. <div class="content symbol">
  392. <ul class="icon_lists dib-box">
  393. <li class="dib">
  394. <svg class="icon svg-icon" aria-hidden="true">
  395. <use xlink:href="#icon-bianji"></use>
  396. </svg>
  397. <div class="name">编辑</div>
  398. <div class="code-name">#icon-bianji</div>
  399. </li>
  400. <li class="dib">
  401. <svg class="icon svg-icon" aria-hidden="true">
  402. <use xlink:href="#icon-quanbudingdan"></use>
  403. </svg>
  404. <div class="name">全部订单</div>
  405. <div class="code-name">#icon-quanbudingdan</div>
  406. </li>
  407. <li class="dib">
  408. <svg class="icon svg-icon" aria-hidden="true">
  409. <use xlink:href="#icon-incubator"></use>
  410. </svg>
  411. <div class="name">工具箱</div>
  412. <div class="code-name">#icon-incubator</div>
  413. </li>
  414. <li class="dib">
  415. <svg class="icon svg-icon" aria-hidden="true">
  416. <use xlink:href="#icon-binggui"></use>
  417. </svg>
  418. <div class="name">冰柜</div>
  419. <div class="code-name">#icon-binggui</div>
  420. </li>
  421. <li class="dib">
  422. <svg class="icon svg-icon" aria-hidden="true">
  423. <use xlink:href="#icon-baowenxiangguanli"></use>
  424. </svg>
  425. <div class="name">保温箱管理</div>
  426. <div class="code-name">#icon-baowenxiangguanli</div>
  427. </li>
  428. <li class="dib">
  429. <svg class="icon svg-icon" aria-hidden="true">
  430. <use xlink:href="#icon-bingpaiguanli"></use>
  431. </svg>
  432. <div class="name">冰排管理</div>
  433. <div class="code-name">#icon-bingpaiguanli</div>
  434. </li>
  435. <li class="dib">
  436. <svg class="icon svg-icon" aria-hidden="true">
  437. <use xlink:href="#icon-bingpaichuku"></use>
  438. </svg>
  439. <div class="name">冰排出库</div>
  440. <div class="code-name">#icon-bingpaichuku</div>
  441. </li>
  442. <li class="dib">
  443. <svg class="icon svg-icon" aria-hidden="true">
  444. <use xlink:href="#icon-bingpairuku"></use>
  445. </svg>
  446. <div class="name">冰排入库</div>
  447. <div class="code-name">#icon-bingpairuku</div>
  448. </li>
  449. <li class="dib">
  450. <svg class="icon svg-icon" aria-hidden="true">
  451. <use xlink:href="#icon-dizhibu"></use>
  452. </svg>
  453. <div class="name">地址簿</div>
  454. <div class="code-name">#icon-dizhibu</div>
  455. </li>
  456. <li class="dib">
  457. <svg class="icon svg-icon" aria-hidden="true">
  458. <use xlink:href="#icon-zhankai1"></use>
  459. </svg>
  460. <div class="name">展开</div>
  461. <div class="code-name">#icon-zhankai1</div>
  462. </li>
  463. <li class="dib">
  464. <svg class="icon svg-icon" aria-hidden="true">
  465. <use xlink:href="#icon-tianjiadingdan"></use>
  466. </svg>
  467. <div class="name">添加订单</div>
  468. <div class="code-name">#icon-tianjiadingdan</div>
  469. </li>
  470. <li class="dib">
  471. <svg class="icon svg-icon" aria-hidden="true">
  472. <use xlink:href="#icon-dingdan"></use>
  473. </svg>
  474. <div class="name">全部订单</div>
  475. <div class="code-name">#icon-dingdan</div>
  476. </li>
  477. <li class="dib">
  478. <svg class="icon svg-icon" aria-hidden="true">
  479. <use xlink:href="#icon-tuichudenglu"></use>
  480. </svg>
  481. <div class="name">logout</div>
  482. <div class="code-name">#icon-tuichudenglu</div>
  483. </li>
  484. <li class="dib">
  485. <svg class="icon svg-icon" aria-hidden="true">
  486. <use xlink:href="#icon-shouye"></use>
  487. </svg>
  488. <div class="name">首页</div>
  489. <div class="code-name">#icon-shouye</div>
  490. </li>
  491. <li class="dib">
  492. <svg class="icon svg-icon" aria-hidden="true">
  493. <use xlink:href="#icon-saoyisao"></use>
  494. </svg>
  495. <div class="name">扫一扫</div>
  496. <div class="code-name">#icon-saoyisao</div>
  497. </li>
  498. <li class="dib">
  499. <svg class="icon svg-icon" aria-hidden="true">
  500. <use xlink:href="#icon-qianshou"></use>
  501. </svg>
  502. <div class="name">核销订单</div>
  503. <div class="code-name">#icon-qianshou</div>
  504. </li>
  505. <li class="dib">
  506. <svg class="icon svg-icon" aria-hidden="true">
  507. <use xlink:href="#icon-wode"></use>
  508. </svg>
  509. <div class="name">我的</div>
  510. <div class="code-name">#icon-wode</div>
  511. </li>
  512. <li class="dib">
  513. <svg class="icon svg-icon" aria-hidden="true">
  514. <use xlink:href="#icon-yiquxiao"></use>
  515. </svg>
  516. <div class="name">已取消</div>
  517. <div class="code-name">#icon-yiquxiao</div>
  518. </li>
  519. <li class="dib">
  520. <svg class="icon svg-icon" aria-hidden="true">
  521. <use xlink:href="#icon-yisongda"></use>
  522. </svg>
  523. <div class="name">已送达</div>
  524. <div class="code-name">#icon-yisongda</div>
  525. </li>
  526. <li class="dib">
  527. <svg class="icon svg-icon" aria-hidden="true">
  528. <use xlink:href="#icon-delivery"></use>
  529. </svg>
  530. <div class="name">配送中</div>
  531. <div class="code-name">#icon-delivery</div>
  532. </li>
  533. <li class="dib">
  534. <svg class="icon svg-icon" aria-hidden="true">
  535. <use xlink:href="#icon-cancel"></use>
  536. </svg>
  537. <div class="name">物流信息-已下单</div>
  538. <div class="code-name">#icon-cancel</div>
  539. </li>
  540. </ul>
  541. <div class="article markdown">
  542. <h2 id="symbol-">Symbol 引用</h2>
  543. <hr>
  544. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  545. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  546. <ul>
  547. <li>支持多色图标了,不再受单色限制。</li>
  548. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  549. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  550. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  551. </ul>
  552. <p>使用步骤如下:</p>
  553. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  554. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  555. </code></pre>
  556. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  557. <pre><code class="language-html">&lt;style&gt;
  558. .icon {
  559. width: 1em;
  560. height: 1em;
  561. vertical-align: -0.15em;
  562. fill: currentColor;
  563. overflow: hidden;
  564. }
  565. &lt;/style&gt;
  566. </code></pre>
  567. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  568. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  569. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  570. &lt;/svg&gt;
  571. </code></pre>
  572. </div>
  573. </div>
  574. </div>
  575. </div>
  576. <script>
  577. $(document).ready(function () {
  578. $('.tab-container .content:first').show()
  579. $('#tabs li').click(function (e) {
  580. var tabContent = $('.tab-container .content')
  581. var index = $(this).index()
  582. if ($(this).hasClass('active')) {
  583. return
  584. } else {
  585. $('#tabs li').removeClass('active')
  586. $(this).addClass('active')
  587. tabContent.hide().eq(index).fadeIn()
  588. }
  589. })
  590. })
  591. </script>
  592. </body>
  593. </html>