demo_index.html 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  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/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
  7. <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.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=1609652" 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">&#xe653;</span>
  53. <div class="name">拆分</div>
  54. <div class="code-name">&amp;#xe653;</div>
  55. </li>
  56. <li class="dib">
  57. <span class="icon iconfont">&#xe609;</span>
  58. <div class="name">撤销</div>
  59. <div class="code-name">&amp;#xe609;</div>
  60. </li>
  61. <li class="dib">
  62. <span class="icon iconfont">&#xe60d;</span>
  63. <div class="name">全屏</div>
  64. <div class="code-name">&amp;#xe60d;</div>
  65. </li>
  66. <li class="dib">
  67. <span class="icon iconfont">&#xe60e;</span>
  68. <div class="name">重做</div>
  69. <div class="code-name">&amp;#xe60e;</div>
  70. </li>
  71. <li class="dib">
  72. <span class="icon iconfont">&#xe60f;</span>
  73. <div class="name">组件</div>
  74. <div class="code-name">&amp;#xe60f;</div>
  75. </li>
  76. <li class="dib">
  77. <span class="icon iconfont">&#xe610;</span>
  78. <div class="name">编辑2</div>
  79. <div class="code-name">&amp;#xe610;</div>
  80. </li>
  81. <li class="dib">
  82. <span class="icon iconfont">&#xe8cd;</span>
  83. <div class="name">tabs</div>
  84. <div class="code-name">&amp;#xe8cd;</div>
  85. </li>
  86. <li class="dib">
  87. <span class="icon iconfont">&#xe65b;</span>
  88. <div class="name">LC_icon_edit_line_1</div>
  89. <div class="code-name">&amp;#xe65b;</div>
  90. </li>
  91. <li class="dib">
  92. <span class="icon iconfont">&#xe72a;</span>
  93. <div class="name">edit</div>
  94. <div class="code-name">&amp;#xe72a;</div>
  95. </li>
  96. <li class="dib">
  97. <span class="icon iconfont">&#xe83b;</span>
  98. <div class="name">edit-2</div>
  99. <div class="code-name">&amp;#xe83b;</div>
  100. </li>
  101. <li class="dib">
  102. <span class="icon iconfont">&#xe7a5;</span>
  103. <div class="name">树型</div>
  104. <div class="code-name">&amp;#xe7a5;</div>
  105. </li>
  106. <li class="dib">
  107. <span class="icon iconfont">&#xe608;</span>
  108. <div class="name">模型树</div>
  109. <div class="code-name">&amp;#xe608;</div>
  110. </li>
  111. <li class="dib">
  112. <span class="icon iconfont">&#xe61f;</span>
  113. <div class="name">关联</div>
  114. <div class="code-name">&amp;#xe61f;</div>
  115. </li>
  116. <li class="dib">
  117. <span class="icon iconfont">&#xe607;</span>
  118. <div class="name">edit-编辑</div>
  119. <div class="code-name">&amp;#xe607;</div>
  120. </li>
  121. <li class="dib">
  122. <span class="icon iconfont">&#xe612;</span>
  123. <div class="name">write-写</div>
  124. <div class="code-name">&amp;#xe612;</div>
  125. </li>
  126. <li class="dib">
  127. <span class="icon iconfont">&#xe613;</span>
  128. <div class="name">gallery-画廊</div>
  129. <div class="code-name">&amp;#xe613;</div>
  130. </li>
  131. <li class="dib">
  132. <span class="icon iconfont">&#xe606;</span>
  133. <div class="name">代码</div>
  134. <div class="code-name">&amp;#xe606;</div>
  135. </li>
  136. <li class="dib">
  137. <span class="icon iconfont">&#xe693;</span>
  138. <div class="name">html5</div>
  139. <div class="code-name">&amp;#xe693;</div>
  140. </li>
  141. <li class="dib">
  142. <span class="icon iconfont">&#xe615;</span>
  143. <div class="name">提示</div>
  144. <div class="code-name">&amp;#xe615;</div>
  145. </li>
  146. <li class="dib">
  147. <span class="icon iconfont">&#xe633;</span>
  148. <div class="name">time-时间</div>
  149. <div class="code-name">&amp;#xe633;</div>
  150. </li>
  151. <li class="dib">
  152. <span class="icon iconfont">&#xe639;</span>
  153. <div class="name">number</div>
  154. <div class="code-name">&amp;#xe639;</div>
  155. </li>
  156. <li class="dib">
  157. <span class="icon iconfont">&#xe605;</span>
  158. <div class="name">menu-菜单</div>
  159. <div class="code-name">&amp;#xe605;</div>
  160. </li>
  161. <li class="dib">
  162. <span class="icon iconfont">&#xe60b;</span>
  163. <div class="name">download-下载</div>
  164. <div class="code-name">&amp;#xe60b;</div>
  165. </li>
  166. <li class="dib">
  167. <span class="icon iconfont">&#xe60c;</span>
  168. <div class="name">upload-上传</div>
  169. <div class="code-name">&amp;#xe60c;</div>
  170. </li>
  171. <li class="dib">
  172. <span class="icon iconfont">&#xe611;</span>
  173. <div class="name">folder-文件夹</div>
  174. <div class="code-name">&amp;#xe611;</div>
  175. </li>
  176. <li class="dib">
  177. <span class="icon iconfont">&#xe61a;</span>
  178. <div class="name">image-图像</div>
  179. <div class="code-name">&amp;#xe61a;</div>
  180. </li>
  181. <li class="dib">
  182. <span class="icon iconfont">&#xe60a;</span>
  183. <div class="name">calendar-日历</div>
  184. <div class="code-name">&amp;#xe60a;</div>
  185. </li>
  186. <li class="dib">
  187. <span class="icon iconfont">&#xe676;</span>
  188. <div class="name">单选-粗线条</div>
  189. <div class="code-name">&amp;#xe676;</div>
  190. </li>
  191. <li class="dib">
  192. <span class="icon iconfont">&#xe623;</span>
  193. <div class="name">字号</div>
  194. <div class="code-name">&amp;#xe623;</div>
  195. </li>
  196. <li class="dib">
  197. <span class="icon iconfont">&#xe637;</span>
  198. <div class="name">button-add-按钮添加</div>
  199. <div class="code-name">&amp;#xe637;</div>
  200. </li>
  201. <li class="dib">
  202. <span class="icon iconfont">&#xe638;</span>
  203. <div class="name">button-remove-按钮删除</div>
  204. <div class="code-name">&amp;#xe638;</div>
  205. </li>
  206. <li class="dib">
  207. <span class="icon iconfont">&#xe66d;</span>
  208. <div class="name">多选</div>
  209. <div class="code-name">&amp;#xe66d;</div>
  210. </li>
  211. <li class="dib">
  212. <span class="icon iconfont">&#xe6e6;</span>
  213. <div class="name">单行文本</div>
  214. <div class="code-name">&amp;#xe6e6;</div>
  215. </li>
  216. <li class="dib">
  217. <span class="icon iconfont">&#xe6e7;</span>
  218. <div class="name">多行文本</div>
  219. <div class="code-name">&amp;#xe6e7;</div>
  220. </li>
  221. <li class="dib">
  222. <span class="icon iconfont">&#xe62d;</span>
  223. <div class="name">单选 选中</div>
  224. <div class="code-name">&amp;#xe62d;</div>
  225. </li>
  226. <li class="dib">
  227. <span class="icon iconfont">&#xe6da;</span>
  228. <div class="name">开关3</div>
  229. <div class="code-name">&amp;#xe6da;</div>
  230. </li>
  231. <li class="dib">
  232. <span class="icon iconfont">&#xe63e;</span>
  233. <div class="name">表格</div>
  234. <div class="code-name">&amp;#xe63e;</div>
  235. </li>
  236. <li class="dib">
  237. <span class="icon iconfont">&#xe674;</span>
  238. <div class="name">卡片</div>
  239. <div class="code-name">&amp;#xe674;</div>
  240. </li>
  241. <li class="dib">
  242. <span class="icon iconfont">&#xe63f;</span>
  243. <div class="name">栅格</div>
  244. <div class="code-name">&amp;#xe63f;</div>
  245. </li>
  246. <li class="dib">
  247. <span class="icon iconfont">&#xe640;</span>
  248. <div class="name">下拉2</div>
  249. <div class="code-name">&amp;#xe640;</div>
  250. </li>
  251. <li class="dib">
  252. <span class="icon iconfont">&#xec7f;</span>
  253. <div class="name">分割线</div>
  254. <div class="code-name">&amp;#xec7f;</div>
  255. </li>
  256. <li class="dib">
  257. <span class="icon iconfont">&#xe877;</span>
  258. <div class="name">评分_默认</div>
  259. <div class="code-name">&amp;#xe877;</div>
  260. </li>
  261. </ul>
  262. <div class="article markdown">
  263. <h2 id="unicode-">Unicode 引用</h2>
  264. <hr>
  265. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  266. <ul>
  267. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  268. <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
  269. </ul>
  270. <blockquote>
  271. <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
  272. </blockquote>
  273. <p>Unicode 使用步骤如下:</p>
  274. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  275. <pre><code class="language-css"
  276. >@font-face {
  277. font-family: 'iconfont';
  278. src: url('iconfont.woff2?t=1622099828259') format('woff2'),
  279. url('iconfont.woff?t=1622099828259') format('woff'),
  280. url('iconfont.ttf?t=1622099828259') format('truetype');
  281. }
  282. </code></pre>
  283. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  284. <pre><code class="language-css"
  285. >.iconfont {
  286. font-family: "iconfont" !important;
  287. font-size: 16px;
  288. font-style: normal;
  289. -webkit-font-smoothing: antialiased;
  290. -moz-osx-font-smoothing: grayscale;
  291. }
  292. </code></pre>
  293. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  294. <pre>
  295. <code class="language-html"
  296. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  297. </code></pre>
  298. <blockquote>
  299. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  300. </blockquote>
  301. </div>
  302. </div>
  303. <div class="content font-class">
  304. <ul class="icon_lists dib-box">
  305. <li class="dib">
  306. <span class="icon iconfont icon-chaifen"></span>
  307. <div class="name">
  308. 拆分
  309. </div>
  310. <div class="code-name">.icon-chaifen
  311. </div>
  312. </li>
  313. <li class="dib">
  314. <span class="icon iconfont icon-chexiao"></span>
  315. <div class="name">
  316. 撤销
  317. </div>
  318. <div class="code-name">.icon-chexiao
  319. </div>
  320. </li>
  321. <li class="dib">
  322. <span class="icon iconfont icon-quanping"></span>
  323. <div class="name">
  324. 全屏
  325. </div>
  326. <div class="code-name">.icon-quanping
  327. </div>
  328. </li>
  329. <li class="dib">
  330. <span class="icon iconfont icon-zhongzuo"></span>
  331. <div class="name">
  332. 重做
  333. </div>
  334. <div class="code-name">.icon-zhongzuo
  335. </div>
  336. </li>
  337. <li class="dib">
  338. <span class="icon iconfont icon-zujian"></span>
  339. <div class="name">
  340. 组件
  341. </div>
  342. <div class="code-name">.icon-zujian
  343. </div>
  344. </li>
  345. <li class="dib">
  346. <span class="icon iconfont icon-bianji2"></span>
  347. <div class="name">
  348. 编辑2
  349. </div>
  350. <div class="code-name">.icon-bianji2
  351. </div>
  352. </li>
  353. <li class="dib">
  354. <span class="icon iconfont icon-tabs"></span>
  355. <div class="name">
  356. tabs
  357. </div>
  358. <div class="code-name">.icon-tabs
  359. </div>
  360. </li>
  361. <li class="dib">
  362. <span class="icon iconfont icon-LC_icon_edit_line_1"></span>
  363. <div class="name">
  364. LC_icon_edit_line_1
  365. </div>
  366. <div class="code-name">.icon-LC_icon_edit_line_1
  367. </div>
  368. </li>
  369. <li class="dib">
  370. <span class="icon iconfont icon-edit1"></span>
  371. <div class="name">
  372. edit
  373. </div>
  374. <div class="code-name">.icon-edit1
  375. </div>
  376. </li>
  377. <li class="dib">
  378. <span class="icon iconfont icon-edit-"></span>
  379. <div class="name">
  380. edit-2
  381. </div>
  382. <div class="code-name">.icon-edit-
  383. </div>
  384. </li>
  385. <li class="dib">
  386. <span class="icon iconfont icon-juxingkaobei"></span>
  387. <div class="name">
  388. 树型
  389. </div>
  390. <div class="code-name">.icon-juxingkaobei
  391. </div>
  392. </li>
  393. <li class="dib">
  394. <span class="icon iconfont icon-tree"></span>
  395. <div class="name">
  396. 模型树
  397. </div>
  398. <div class="code-name">.icon-tree
  399. </div>
  400. </li>
  401. <li class="dib">
  402. <span class="icon iconfont icon-guanlian"></span>
  403. <div class="name">
  404. 关联
  405. </div>
  406. <div class="code-name">.icon-guanlian
  407. </div>
  408. </li>
  409. <li class="dib">
  410. <span class="icon iconfont icon-edit"></span>
  411. <div class="name">
  412. edit-编辑
  413. </div>
  414. <div class="code-name">.icon-edit
  415. </div>
  416. </li>
  417. <li class="dib">
  418. <span class="icon iconfont icon-write"></span>
  419. <div class="name">
  420. write-写
  421. </div>
  422. <div class="code-name">.icon-write
  423. </div>
  424. </li>
  425. <li class="dib">
  426. <span class="icon iconfont icon-gallery"></span>
  427. <div class="name">
  428. gallery-画廊
  429. </div>
  430. <div class="code-name">.icon-gallery
  431. </div>
  432. </li>
  433. <li class="dib">
  434. <span class="icon iconfont icon-ai-code"></span>
  435. <div class="name">
  436. 代码
  437. </div>
  438. <div class="code-name">.icon-ai-code
  439. </div>
  440. </li>
  441. <li class="dib">
  442. <span class="icon iconfont icon-html"></span>
  443. <div class="name">
  444. html5
  445. </div>
  446. <div class="code-name">.icon-html
  447. </div>
  448. </li>
  449. <li class="dib">
  450. <span class="icon iconfont icon-zu"></span>
  451. <div class="name">
  452. 提示
  453. </div>
  454. <div class="code-name">.icon-zu
  455. </div>
  456. </li>
  457. <li class="dib">
  458. <span class="icon iconfont icon-time"></span>
  459. <div class="name">
  460. time-时间
  461. </div>
  462. <div class="code-name">.icon-time
  463. </div>
  464. </li>
  465. <li class="dib">
  466. <span class="icon iconfont icon-number"></span>
  467. <div class="name">
  468. number
  469. </div>
  470. <div class="code-name">.icon-number
  471. </div>
  472. </li>
  473. <li class="dib">
  474. <span class="icon iconfont icon-menu"></span>
  475. <div class="name">
  476. menu-菜单
  477. </div>
  478. <div class="code-name">.icon-menu
  479. </div>
  480. </li>
  481. <li class="dib">
  482. <span class="icon iconfont icon-download"></span>
  483. <div class="name">
  484. download-下载
  485. </div>
  486. <div class="code-name">.icon-download
  487. </div>
  488. </li>
  489. <li class="dib">
  490. <span class="icon iconfont icon-upload"></span>
  491. <div class="name">
  492. upload-上传
  493. </div>
  494. <div class="code-name">.icon-upload
  495. </div>
  496. </li>
  497. <li class="dib">
  498. <span class="icon iconfont icon-folder"></span>
  499. <div class="name">
  500. folder-文件夹
  501. </div>
  502. <div class="code-name">.icon-folder
  503. </div>
  504. </li>
  505. <li class="dib">
  506. <span class="icon iconfont icon-image"></span>
  507. <div class="name">
  508. image-图像
  509. </div>
  510. <div class="code-name">.icon-image
  511. </div>
  512. </li>
  513. <li class="dib">
  514. <span class="icon iconfont icon-calendar"></span>
  515. <div class="name">
  516. calendar-日历
  517. </div>
  518. <div class="code-name">.icon-calendar
  519. </div>
  520. </li>
  521. <li class="dib">
  522. <span class="icon iconfont icon-danxuan-cuxiantiao"></span>
  523. <div class="name">
  524. 单选-粗线条
  525. </div>
  526. <div class="code-name">.icon-danxuan-cuxiantiao
  527. </div>
  528. </li>
  529. <li class="dib">
  530. <span class="icon iconfont icon-zihao"></span>
  531. <div class="name">
  532. 字号
  533. </div>
  534. <div class="code-name">.icon-zihao
  535. </div>
  536. </li>
  537. <li class="dib">
  538. <span class="icon iconfont icon-button-add"></span>
  539. <div class="name">
  540. button-add-按钮添加
  541. </div>
  542. <div class="code-name">.icon-button-add
  543. </div>
  544. </li>
  545. <li class="dib">
  546. <span class="icon iconfont icon-button-remove"></span>
  547. <div class="name">
  548. button-remove-按钮删除
  549. </div>
  550. <div class="code-name">.icon-button-remove
  551. </div>
  552. </li>
  553. <li class="dib">
  554. <span class="icon iconfont icon-duoxuan1"></span>
  555. <div class="name">
  556. 多选
  557. </div>
  558. <div class="code-name">.icon-duoxuan1
  559. </div>
  560. </li>
  561. <li class="dib">
  562. <span class="icon iconfont icon-danhangwenben"></span>
  563. <div class="name">
  564. 单行文本
  565. </div>
  566. <div class="code-name">.icon-danhangwenben
  567. </div>
  568. </li>
  569. <li class="dib">
  570. <span class="icon iconfont icon-duohangwenben"></span>
  571. <div class="name">
  572. 多行文本
  573. </div>
  574. <div class="code-name">.icon-duohangwenben
  575. </div>
  576. </li>
  577. <li class="dib">
  578. <span class="icon iconfont icon-danxuanxuanzhong"></span>
  579. <div class="name">
  580. 单选 选中
  581. </div>
  582. <div class="code-name">.icon-danxuanxuanzhong
  583. </div>
  584. </li>
  585. <li class="dib">
  586. <span class="icon iconfont icon-kaiguan3"></span>
  587. <div class="name">
  588. 开关3
  589. </div>
  590. <div class="code-name">.icon-kaiguan3
  591. </div>
  592. </li>
  593. <li class="dib">
  594. <span class="icon iconfont icon-biaoge"></span>
  595. <div class="name">
  596. 表格
  597. </div>
  598. <div class="code-name">.icon-biaoge
  599. </div>
  600. </li>
  601. <li class="dib">
  602. <span class="icon iconfont icon-qiapian"></span>
  603. <div class="name">
  604. 卡片
  605. </div>
  606. <div class="code-name">.icon-qiapian
  607. </div>
  608. </li>
  609. <li class="dib">
  610. <span class="icon iconfont icon-zhage"></span>
  611. <div class="name">
  612. 栅格
  613. </div>
  614. <div class="code-name">.icon-zhage
  615. </div>
  616. </li>
  617. <li class="dib">
  618. <span class="icon iconfont icon-xiala"></span>
  619. <div class="name">
  620. 下拉2
  621. </div>
  622. <div class="code-name">.icon-xiala
  623. </div>
  624. </li>
  625. <li class="dib">
  626. <span class="icon iconfont icon-fengexian"></span>
  627. <div class="name">
  628. 分割线
  629. </div>
  630. <div class="code-name">.icon-fengexian
  631. </div>
  632. </li>
  633. <li class="dib">
  634. <span class="icon iconfont icon-pingfen_moren"></span>
  635. <div class="name">
  636. 评分_默认
  637. </div>
  638. <div class="code-name">.icon-pingfen_moren
  639. </div>
  640. </li>
  641. </ul>
  642. <div class="article markdown">
  643. <h2 id="font-class-">font-class 引用</h2>
  644. <hr>
  645. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  646. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  647. <ul>
  648. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  649. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  650. </ul>
  651. <p>使用步骤如下:</p>
  652. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  653. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  654. </code></pre>
  655. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  656. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  657. </code></pre>
  658. <blockquote>
  659. <p>"
  660. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  661. </blockquote>
  662. </div>
  663. </div>
  664. <div class="content symbol">
  665. <ul class="icon_lists dib-box">
  666. <li class="dib">
  667. <svg class="icon svg-icon" aria-hidden="true">
  668. <use xlink:href="#icon-chaifen"></use>
  669. </svg>
  670. <div class="name">拆分</div>
  671. <div class="code-name">#icon-chaifen</div>
  672. </li>
  673. <li class="dib">
  674. <svg class="icon svg-icon" aria-hidden="true">
  675. <use xlink:href="#icon-chexiao"></use>
  676. </svg>
  677. <div class="name">撤销</div>
  678. <div class="code-name">#icon-chexiao</div>
  679. </li>
  680. <li class="dib">
  681. <svg class="icon svg-icon" aria-hidden="true">
  682. <use xlink:href="#icon-quanping"></use>
  683. </svg>
  684. <div class="name">全屏</div>
  685. <div class="code-name">#icon-quanping</div>
  686. </li>
  687. <li class="dib">
  688. <svg class="icon svg-icon" aria-hidden="true">
  689. <use xlink:href="#icon-zhongzuo"></use>
  690. </svg>
  691. <div class="name">重做</div>
  692. <div class="code-name">#icon-zhongzuo</div>
  693. </li>
  694. <li class="dib">
  695. <svg class="icon svg-icon" aria-hidden="true">
  696. <use xlink:href="#icon-zujian"></use>
  697. </svg>
  698. <div class="name">组件</div>
  699. <div class="code-name">#icon-zujian</div>
  700. </li>
  701. <li class="dib">
  702. <svg class="icon svg-icon" aria-hidden="true">
  703. <use xlink:href="#icon-bianji2"></use>
  704. </svg>
  705. <div class="name">编辑2</div>
  706. <div class="code-name">#icon-bianji2</div>
  707. </li>
  708. <li class="dib">
  709. <svg class="icon svg-icon" aria-hidden="true">
  710. <use xlink:href="#icon-tabs"></use>
  711. </svg>
  712. <div class="name">tabs</div>
  713. <div class="code-name">#icon-tabs</div>
  714. </li>
  715. <li class="dib">
  716. <svg class="icon svg-icon" aria-hidden="true">
  717. <use xlink:href="#icon-LC_icon_edit_line_1"></use>
  718. </svg>
  719. <div class="name">LC_icon_edit_line_1</div>
  720. <div class="code-name">#icon-LC_icon_edit_line_1</div>
  721. </li>
  722. <li class="dib">
  723. <svg class="icon svg-icon" aria-hidden="true">
  724. <use xlink:href="#icon-edit1"></use>
  725. </svg>
  726. <div class="name">edit</div>
  727. <div class="code-name">#icon-edit1</div>
  728. </li>
  729. <li class="dib">
  730. <svg class="icon svg-icon" aria-hidden="true">
  731. <use xlink:href="#icon-edit-"></use>
  732. </svg>
  733. <div class="name">edit-2</div>
  734. <div class="code-name">#icon-edit-</div>
  735. </li>
  736. <li class="dib">
  737. <svg class="icon svg-icon" aria-hidden="true">
  738. <use xlink:href="#icon-juxingkaobei"></use>
  739. </svg>
  740. <div class="name">树型</div>
  741. <div class="code-name">#icon-juxingkaobei</div>
  742. </li>
  743. <li class="dib">
  744. <svg class="icon svg-icon" aria-hidden="true">
  745. <use xlink:href="#icon-tree"></use>
  746. </svg>
  747. <div class="name">模型树</div>
  748. <div class="code-name">#icon-tree</div>
  749. </li>
  750. <li class="dib">
  751. <svg class="icon svg-icon" aria-hidden="true">
  752. <use xlink:href="#icon-guanlian"></use>
  753. </svg>
  754. <div class="name">关联</div>
  755. <div class="code-name">#icon-guanlian</div>
  756. </li>
  757. <li class="dib">
  758. <svg class="icon svg-icon" aria-hidden="true">
  759. <use xlink:href="#icon-edit"></use>
  760. </svg>
  761. <div class="name">edit-编辑</div>
  762. <div class="code-name">#icon-edit</div>
  763. </li>
  764. <li class="dib">
  765. <svg class="icon svg-icon" aria-hidden="true">
  766. <use xlink:href="#icon-write"></use>
  767. </svg>
  768. <div class="name">write-写</div>
  769. <div class="code-name">#icon-write</div>
  770. </li>
  771. <li class="dib">
  772. <svg class="icon svg-icon" aria-hidden="true">
  773. <use xlink:href="#icon-gallery"></use>
  774. </svg>
  775. <div class="name">gallery-画廊</div>
  776. <div class="code-name">#icon-gallery</div>
  777. </li>
  778. <li class="dib">
  779. <svg class="icon svg-icon" aria-hidden="true">
  780. <use xlink:href="#icon-ai-code"></use>
  781. </svg>
  782. <div class="name">代码</div>
  783. <div class="code-name">#icon-ai-code</div>
  784. </li>
  785. <li class="dib">
  786. <svg class="icon svg-icon" aria-hidden="true">
  787. <use xlink:href="#icon-html"></use>
  788. </svg>
  789. <div class="name">html5</div>
  790. <div class="code-name">#icon-html</div>
  791. </li>
  792. <li class="dib">
  793. <svg class="icon svg-icon" aria-hidden="true">
  794. <use xlink:href="#icon-zu"></use>
  795. </svg>
  796. <div class="name">提示</div>
  797. <div class="code-name">#icon-zu</div>
  798. </li>
  799. <li class="dib">
  800. <svg class="icon svg-icon" aria-hidden="true">
  801. <use xlink:href="#icon-time"></use>
  802. </svg>
  803. <div class="name">time-时间</div>
  804. <div class="code-name">#icon-time</div>
  805. </li>
  806. <li class="dib">
  807. <svg class="icon svg-icon" aria-hidden="true">
  808. <use xlink:href="#icon-number"></use>
  809. </svg>
  810. <div class="name">number</div>
  811. <div class="code-name">#icon-number</div>
  812. </li>
  813. <li class="dib">
  814. <svg class="icon svg-icon" aria-hidden="true">
  815. <use xlink:href="#icon-menu"></use>
  816. </svg>
  817. <div class="name">menu-菜单</div>
  818. <div class="code-name">#icon-menu</div>
  819. </li>
  820. <li class="dib">
  821. <svg class="icon svg-icon" aria-hidden="true">
  822. <use xlink:href="#icon-download"></use>
  823. </svg>
  824. <div class="name">download-下载</div>
  825. <div class="code-name">#icon-download</div>
  826. </li>
  827. <li class="dib">
  828. <svg class="icon svg-icon" aria-hidden="true">
  829. <use xlink:href="#icon-upload"></use>
  830. </svg>
  831. <div class="name">upload-上传</div>
  832. <div class="code-name">#icon-upload</div>
  833. </li>
  834. <li class="dib">
  835. <svg class="icon svg-icon" aria-hidden="true">
  836. <use xlink:href="#icon-folder"></use>
  837. </svg>
  838. <div class="name">folder-文件夹</div>
  839. <div class="code-name">#icon-folder</div>
  840. </li>
  841. <li class="dib">
  842. <svg class="icon svg-icon" aria-hidden="true">
  843. <use xlink:href="#icon-image"></use>
  844. </svg>
  845. <div class="name">image-图像</div>
  846. <div class="code-name">#icon-image</div>
  847. </li>
  848. <li class="dib">
  849. <svg class="icon svg-icon" aria-hidden="true">
  850. <use xlink:href="#icon-calendar"></use>
  851. </svg>
  852. <div class="name">calendar-日历</div>
  853. <div class="code-name">#icon-calendar</div>
  854. </li>
  855. <li class="dib">
  856. <svg class="icon svg-icon" aria-hidden="true">
  857. <use xlink:href="#icon-danxuan-cuxiantiao"></use>
  858. </svg>
  859. <div class="name">单选-粗线条</div>
  860. <div class="code-name">#icon-danxuan-cuxiantiao</div>
  861. </li>
  862. <li class="dib">
  863. <svg class="icon svg-icon" aria-hidden="true">
  864. <use xlink:href="#icon-zihao"></use>
  865. </svg>
  866. <div class="name">字号</div>
  867. <div class="code-name">#icon-zihao</div>
  868. </li>
  869. <li class="dib">
  870. <svg class="icon svg-icon" aria-hidden="true">
  871. <use xlink:href="#icon-button-add"></use>
  872. </svg>
  873. <div class="name">button-add-按钮添加</div>
  874. <div class="code-name">#icon-button-add</div>
  875. </li>
  876. <li class="dib">
  877. <svg class="icon svg-icon" aria-hidden="true">
  878. <use xlink:href="#icon-button-remove"></use>
  879. </svg>
  880. <div class="name">button-remove-按钮删除</div>
  881. <div class="code-name">#icon-button-remove</div>
  882. </li>
  883. <li class="dib">
  884. <svg class="icon svg-icon" aria-hidden="true">
  885. <use xlink:href="#icon-duoxuan1"></use>
  886. </svg>
  887. <div class="name">多选</div>
  888. <div class="code-name">#icon-duoxuan1</div>
  889. </li>
  890. <li class="dib">
  891. <svg class="icon svg-icon" aria-hidden="true">
  892. <use xlink:href="#icon-danhangwenben"></use>
  893. </svg>
  894. <div class="name">单行文本</div>
  895. <div class="code-name">#icon-danhangwenben</div>
  896. </li>
  897. <li class="dib">
  898. <svg class="icon svg-icon" aria-hidden="true">
  899. <use xlink:href="#icon-duohangwenben"></use>
  900. </svg>
  901. <div class="name">多行文本</div>
  902. <div class="code-name">#icon-duohangwenben</div>
  903. </li>
  904. <li class="dib">
  905. <svg class="icon svg-icon" aria-hidden="true">
  906. <use xlink:href="#icon-danxuanxuanzhong"></use>
  907. </svg>
  908. <div class="name">单选 选中</div>
  909. <div class="code-name">#icon-danxuanxuanzhong</div>
  910. </li>
  911. <li class="dib">
  912. <svg class="icon svg-icon" aria-hidden="true">
  913. <use xlink:href="#icon-kaiguan3"></use>
  914. </svg>
  915. <div class="name">开关3</div>
  916. <div class="code-name">#icon-kaiguan3</div>
  917. </li>
  918. <li class="dib">
  919. <svg class="icon svg-icon" aria-hidden="true">
  920. <use xlink:href="#icon-biaoge"></use>
  921. </svg>
  922. <div class="name">表格</div>
  923. <div class="code-name">#icon-biaoge</div>
  924. </li>
  925. <li class="dib">
  926. <svg class="icon svg-icon" aria-hidden="true">
  927. <use xlink:href="#icon-qiapian"></use>
  928. </svg>
  929. <div class="name">卡片</div>
  930. <div class="code-name">#icon-qiapian</div>
  931. </li>
  932. <li class="dib">
  933. <svg class="icon svg-icon" aria-hidden="true">
  934. <use xlink:href="#icon-zhage"></use>
  935. </svg>
  936. <div class="name">栅格</div>
  937. <div class="code-name">#icon-zhage</div>
  938. </li>
  939. <li class="dib">
  940. <svg class="icon svg-icon" aria-hidden="true">
  941. <use xlink:href="#icon-xiala"></use>
  942. </svg>
  943. <div class="name">下拉2</div>
  944. <div class="code-name">#icon-xiala</div>
  945. </li>
  946. <li class="dib">
  947. <svg class="icon svg-icon" aria-hidden="true">
  948. <use xlink:href="#icon-fengexian"></use>
  949. </svg>
  950. <div class="name">分割线</div>
  951. <div class="code-name">#icon-fengexian</div>
  952. </li>
  953. <li class="dib">
  954. <svg class="icon svg-icon" aria-hidden="true">
  955. <use xlink:href="#icon-pingfen_moren"></use>
  956. </svg>
  957. <div class="name">评分_默认</div>
  958. <div class="code-name">#icon-pingfen_moren</div>
  959. </li>
  960. </ul>
  961. <div class="article markdown">
  962. <h2 id="symbol-">Symbol 引用</h2>
  963. <hr>
  964. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  965. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  966. <ul>
  967. <li>支持多色图标了,不再受单色限制。</li>
  968. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  969. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  970. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  971. </ul>
  972. <p>使用步骤如下:</p>
  973. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  974. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  975. </code></pre>
  976. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  977. <pre><code class="language-html">&lt;style&gt;
  978. .icon {
  979. width: 1em;
  980. height: 1em;
  981. vertical-align: -0.15em;
  982. fill: currentColor;
  983. overflow: hidden;
  984. }
  985. &lt;/style&gt;
  986. </code></pre>
  987. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  988. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  989. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  990. &lt;/svg&gt;
  991. </code></pre>
  992. </div>
  993. </div>
  994. </div>
  995. </div>
  996. <script>
  997. $(document).ready(function () {
  998. $('.tab-container .content:first').show()
  999. $('#tabs li').click(function (e) {
  1000. var tabContent = $('.tab-container .content')
  1001. var index = $(this).index()
  1002. if ($(this).hasClass('active')) {
  1003. return
  1004. } else {
  1005. $('#tabs li').removeClass('active')
  1006. $(this).addClass('active')
  1007. tabContent.hide().eq(index).fadeIn()
  1008. }
  1009. })
  1010. })
  1011. </script>
  1012. </body>
  1013. </html>