终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

576 righe
20 KiB

  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. </div>
  47. <div class="tab-container">
  48. <div class="content unicode" style="display: block;">
  49. <ul class="icon_lists dib-box">
  50. <li class="dib">
  51. <span class="icon iconfont">&#xe6e2;</span>
  52. <div class="name">节点-子流程</div>
  53. <div class="code-name">&amp;#xe6e2;</div>
  54. </li>
  55. <li class="dib">
  56. <span class="icon iconfont">&#xe64c;</span>
  57. <div class="name">流程</div>
  58. <div class="code-name">&amp;#xe64c;</div>
  59. </li>
  60. <li class="dib">
  61. <span class="icon iconfont">&#xe622;</span>
  62. <div class="name">下载</div>
  63. <div class="code-name">&amp;#xe622;</div>
  64. </li>
  65. <li class="dib">
  66. <span class="icon iconfont">&#xe8cc;</span>
  67. <div class="name">232编辑、输入</div>
  68. <div class="code-name">&amp;#xe8cc;</div>
  69. </li>
  70. <li class="dib">
  71. <span class="icon iconfont">&#xe668;</span>
  72. <div class="name">账号信息</div>
  73. <div class="code-name">&amp;#xe668;</div>
  74. </li>
  75. <li class="dib">
  76. <span class="icon iconfont">&#xe695;</span>
  77. <div class="name">窗口-最大化_line</div>
  78. <div class="code-name">&amp;#xe695;</div>
  79. </li>
  80. <li class="dib">
  81. <span class="icon iconfont">&#xe602;</span>
  82. <div class="name">加号</div>
  83. <div class="code-name">&amp;#xe602;</div>
  84. </li>
  85. <li class="dib">
  86. <span class="icon iconfont">&#xe62b;</span>
  87. <div class="name">密码</div>
  88. <div class="code-name">&amp;#xe62b;</div>
  89. </li>
  90. <li class="dib">
  91. <span class="icon iconfont">&#xe62c;</span>
  92. <div class="name">权限配置</div>
  93. <div class="code-name">&amp;#xe62c;</div>
  94. </li>
  95. <li class="dib">
  96. <span class="icon iconfont">&#xe63f;</span>
  97. <div class="name">下载</div>
  98. <div class="code-name">&amp;#xe63f;</div>
  99. </li>
  100. <li class="dib">
  101. <span class="icon iconfont">&#xe669;</span>
  102. <div class="name">close</div>
  103. <div class="code-name">&amp;#xe669;</div>
  104. </li>
  105. <li class="dib">
  106. <span class="icon iconfont">&#xe67a;</span>
  107. <div class="name">minus</div>
  108. <div class="code-name">&amp;#xe67a;</div>
  109. </li>
  110. <li class="dib">
  111. <span class="icon iconfont">&#xe6a0;</span>
  112. <div class="name">账号中心 账号管理</div>
  113. <div class="code-name">&amp;#xe6a0;</div>
  114. </li>
  115. <li class="dib">
  116. <span class="icon iconfont">&#xe979;</span>
  117. <div class="name">齿轮,设置,设定</div>
  118. <div class="code-name">&amp;#xe979;</div>
  119. </li>
  120. <li class="dib">
  121. <span class="icon iconfont">&#xe6b7;</span>
  122. <div class="name">面性密码锁</div>
  123. <div class="code-name">&amp;#xe6b7;</div>
  124. </li>
  125. <li class="dib">
  126. <span class="icon iconfont">&#xe7ab;</span>
  127. <div class="name">工艺流程_0</div>
  128. <div class="code-name">&amp;#xe7ab;</div>
  129. </li>
  130. <li class="dib">
  131. <span class="icon iconfont">&#xe8e0;</span>
  132. <div class="name">166-NFC</div>
  133. <div class="code-name">&amp;#xe8e0;</div>
  134. </li>
  135. </ul>
  136. <div class="article markdown">
  137. <h2 id="unicode-">Unicode 引用</h2>
  138. <hr>
  139. <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
  140. <ul>
  141. <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
  142. <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
  143. </ul>
  144. <blockquote>
  145. <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
  146. </blockquote>
  147. <p>Unicode 使用步骤如下:</p>
  148. <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
  149. <pre><code class="language-css"
  150. >@font-face {
  151. font-family: 'iconfont';
  152. src: url('iconfont.ttf?t=1660817438136') format('truetype');
  153. }
  154. </code></pre>
  155. <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
  156. <pre><code class="language-css"
  157. >.iconfont {
  158. font-family: "iconfont" !important;
  159. font-size: 16px;
  160. font-style: normal;
  161. -webkit-font-smoothing: antialiased;
  162. -moz-osx-font-smoothing: grayscale;
  163. }
  164. </code></pre>
  165. <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
  166. <pre>
  167. <code class="language-html"
  168. >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
  169. </code></pre>
  170. <blockquote>
  171. <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  172. </blockquote>
  173. </div>
  174. </div>
  175. <div class="content font-class">
  176. <ul class="icon_lists dib-box">
  177. <li class="dib">
  178. <span class="icon iconfont icon-jiedianziliucheng"></span>
  179. <div class="name">
  180. 节点-子流程
  181. </div>
  182. <div class="code-name">.icon-jiedianziliucheng
  183. </div>
  184. </li>
  185. <li class="dib">
  186. <span class="icon iconfont icon-liucheng"></span>
  187. <div class="name">
  188. 流程
  189. </div>
  190. <div class="code-name">.icon-liucheng
  191. </div>
  192. </li>
  193. <li class="dib">
  194. <span class="icon iconfont icon-xiazai"></span>
  195. <div class="name">
  196. 下载
  197. </div>
  198. <div class="code-name">.icon-xiazai
  199. </div>
  200. </li>
  201. <li class="dib">
  202. <span class="icon iconfont icon-bianjishuru"></span>
  203. <div class="name">
  204. 232编辑、输入
  205. </div>
  206. <div class="code-name">.icon-bianjishuru
  207. </div>
  208. </li>
  209. <li class="dib">
  210. <span class="icon iconfont icon-zhanghaoxinxi"></span>
  211. <div class="name">
  212. 账号信息
  213. </div>
  214. <div class="code-name">.icon-zhanghaoxinxi
  215. </div>
  216. </li>
  217. <li class="dib">
  218. <span class="icon iconfont icon-window-max_line"></span>
  219. <div class="name">
  220. 窗口-最大化_line
  221. </div>
  222. <div class="code-name">.icon-window-max_line
  223. </div>
  224. </li>
  225. <li class="dib">
  226. <span class="icon iconfont icon-jiahao"></span>
  227. <div class="name">
  228. 加号
  229. </div>
  230. <div class="code-name">.icon-jiahao
  231. </div>
  232. </li>
  233. <li class="dib">
  234. <span class="icon iconfont icon-mima"></span>
  235. <div class="name">
  236. 密码
  237. </div>
  238. <div class="code-name">.icon-mima
  239. </div>
  240. </li>
  241. <li class="dib">
  242. <span class="icon iconfont icon-quanxianpeizhi"></span>
  243. <div class="name">
  244. 权限配置
  245. </div>
  246. <div class="code-name">.icon-quanxianpeizhi
  247. </div>
  248. </li>
  249. <li class="dib">
  250. <span class="icon iconfont icon-xiazai1"></span>
  251. <div class="name">
  252. 下载
  253. </div>
  254. <div class="code-name">.icon-xiazai1
  255. </div>
  256. </li>
  257. <li class="dib">
  258. <span class="icon iconfont icon-close"></span>
  259. <div class="name">
  260. close
  261. </div>
  262. <div class="code-name">.icon-close
  263. </div>
  264. </li>
  265. <li class="dib">
  266. <span class="icon iconfont icon-minus"></span>
  267. <div class="name">
  268. minus
  269. </div>
  270. <div class="code-name">.icon-minus
  271. </div>
  272. </li>
  273. <li class="dib">
  274. <span class="icon iconfont icon-zhanghaozhongxinzhanghaoguanli"></span>
  275. <div class="name">
  276. 账号中心 账号管理
  277. </div>
  278. <div class="code-name">.icon-zhanghaozhongxinzhanghaoguanli
  279. </div>
  280. </li>
  281. <li class="dib">
  282. <span class="icon iconfont icon-set"></span>
  283. <div class="name">
  284. 齿轮,设置,设定
  285. </div>
  286. <div class="code-name">.icon-set
  287. </div>
  288. </li>
  289. <li class="dib">
  290. <span class="icon iconfont icon-mianxingmima"></span>
  291. <div class="name">
  292. 面性密码锁
  293. </div>
  294. <div class="code-name">.icon-mianxingmima
  295. </div>
  296. </li>
  297. <li class="dib">
  298. <span class="icon iconfont icon-gongyiliucheng_0"></span>
  299. <div class="name">
  300. 工艺流程_0
  301. </div>
  302. <div class="code-name">.icon-gongyiliucheng_0
  303. </div>
  304. </li>
  305. <li class="dib">
  306. <span class="icon iconfont icon-a-166-NFC"></span>
  307. <div class="name">
  308. 166-NFC
  309. </div>
  310. <div class="code-name">.icon-a-166-NFC
  311. </div>
  312. </li>
  313. </ul>
  314. <div class="article markdown">
  315. <h2 id="font-class-">font-class 引用</h2>
  316. <hr>
  317. <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
  318. <p>与 Unicode 使用方式相比,具有如下特点:</p>
  319. <ul>
  320. <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
  321. <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
  322. </ul>
  323. <p>使用步骤如下:</p>
  324. <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
  325. <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
  326. </code></pre>
  327. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  328. <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
  329. </code></pre>
  330. <blockquote>
  331. <p>"
  332. iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
  333. </blockquote>
  334. </div>
  335. </div>
  336. <div class="content symbol">
  337. <ul class="icon_lists dib-box">
  338. <li class="dib">
  339. <svg class="icon svg-icon" aria-hidden="true">
  340. <use xlink:href="#icon-jiedianziliucheng"></use>
  341. </svg>
  342. <div class="name">节点-子流程</div>
  343. <div class="code-name">#icon-jiedianziliucheng</div>
  344. </li>
  345. <li class="dib">
  346. <svg class="icon svg-icon" aria-hidden="true">
  347. <use xlink:href="#icon-liucheng"></use>
  348. </svg>
  349. <div class="name">流程</div>
  350. <div class="code-name">#icon-liucheng</div>
  351. </li>
  352. <li class="dib">
  353. <svg class="icon svg-icon" aria-hidden="true">
  354. <use xlink:href="#icon-xiazai"></use>
  355. </svg>
  356. <div class="name">下载</div>
  357. <div class="code-name">#icon-xiazai</div>
  358. </li>
  359. <li class="dib">
  360. <svg class="icon svg-icon" aria-hidden="true">
  361. <use xlink:href="#icon-bianjishuru"></use>
  362. </svg>
  363. <div class="name">232编辑、输入</div>
  364. <div class="code-name">#icon-bianjishuru</div>
  365. </li>
  366. <li class="dib">
  367. <svg class="icon svg-icon" aria-hidden="true">
  368. <use xlink:href="#icon-zhanghaoxinxi"></use>
  369. </svg>
  370. <div class="name">账号信息</div>
  371. <div class="code-name">#icon-zhanghaoxinxi</div>
  372. </li>
  373. <li class="dib">
  374. <svg class="icon svg-icon" aria-hidden="true">
  375. <use xlink:href="#icon-window-max_line"></use>
  376. </svg>
  377. <div class="name">窗口-最大化_line</div>
  378. <div class="code-name">#icon-window-max_line</div>
  379. </li>
  380. <li class="dib">
  381. <svg class="icon svg-icon" aria-hidden="true">
  382. <use xlink:href="#icon-jiahao"></use>
  383. </svg>
  384. <div class="name">加号</div>
  385. <div class="code-name">#icon-jiahao</div>
  386. </li>
  387. <li class="dib">
  388. <svg class="icon svg-icon" aria-hidden="true">
  389. <use xlink:href="#icon-mima"></use>
  390. </svg>
  391. <div class="name">密码</div>
  392. <div class="code-name">#icon-mima</div>
  393. </li>
  394. <li class="dib">
  395. <svg class="icon svg-icon" aria-hidden="true">
  396. <use xlink:href="#icon-quanxianpeizhi"></use>
  397. </svg>
  398. <div class="name">权限配置</div>
  399. <div class="code-name">#icon-quanxianpeizhi</div>
  400. </li>
  401. <li class="dib">
  402. <svg class="icon svg-icon" aria-hidden="true">
  403. <use xlink:href="#icon-xiazai1"></use>
  404. </svg>
  405. <div class="name">下载</div>
  406. <div class="code-name">#icon-xiazai1</div>
  407. </li>
  408. <li class="dib">
  409. <svg class="icon svg-icon" aria-hidden="true">
  410. <use xlink:href="#icon-close"></use>
  411. </svg>
  412. <div class="name">close</div>
  413. <div class="code-name">#icon-close</div>
  414. </li>
  415. <li class="dib">
  416. <svg class="icon svg-icon" aria-hidden="true">
  417. <use xlink:href="#icon-minus"></use>
  418. </svg>
  419. <div class="name">minus</div>
  420. <div class="code-name">#icon-minus</div>
  421. </li>
  422. <li class="dib">
  423. <svg class="icon svg-icon" aria-hidden="true">
  424. <use xlink:href="#icon-zhanghaozhongxinzhanghaoguanli"></use>
  425. </svg>
  426. <div class="name">账号中心 账号管理</div>
  427. <div class="code-name">#icon-zhanghaozhongxinzhanghaoguanli</div>
  428. </li>
  429. <li class="dib">
  430. <svg class="icon svg-icon" aria-hidden="true">
  431. <use xlink:href="#icon-set"></use>
  432. </svg>
  433. <div class="name">齿轮,设置,设定</div>
  434. <div class="code-name">#icon-set</div>
  435. </li>
  436. <li class="dib">
  437. <svg class="icon svg-icon" aria-hidden="true">
  438. <use xlink:href="#icon-mianxingmima"></use>
  439. </svg>
  440. <div class="name">面性密码锁</div>
  441. <div class="code-name">#icon-mianxingmima</div>
  442. </li>
  443. <li class="dib">
  444. <svg class="icon svg-icon" aria-hidden="true">
  445. <use xlink:href="#icon-gongyiliucheng_0"></use>
  446. </svg>
  447. <div class="name">工艺流程_0</div>
  448. <div class="code-name">#icon-gongyiliucheng_0</div>
  449. </li>
  450. <li class="dib">
  451. <svg class="icon svg-icon" aria-hidden="true">
  452. <use xlink:href="#icon-a-166-NFC"></use>
  453. </svg>
  454. <div class="name">166-NFC</div>
  455. <div class="code-name">#icon-a-166-NFC</div>
  456. </li>
  457. </ul>
  458. <div class="article markdown">
  459. <h2 id="symbol-">Symbol 引用</h2>
  460. <hr>
  461. <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
  462. 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
  463. <ul>
  464. <li>支持多色图标了,不再受单色限制。</li>
  465. <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
  466. <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
  467. <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
  468. </ul>
  469. <p>使用步骤如下:</p>
  470. <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
  471. <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
  472. </code></pre>
  473. <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
  474. <pre><code class="language-html">&lt;style&gt;
  475. .icon {
  476. width: 1em;
  477. height: 1em;
  478. vertical-align: -0.15em;
  479. fill: currentColor;
  480. overflow: hidden;
  481. }
  482. &lt;/style&gt;
  483. </code></pre>
  484. <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
  485. <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
  486. &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
  487. &lt;/svg&gt;
  488. </code></pre>
  489. </div>
  490. </div>
  491. </div>
  492. </div>
  493. <script>
  494. $(document).ready(function () {
  495. $('.tab-container .content:first').show()
  496. $('#tabs li').click(function (e) {
  497. var tabContent = $('.tab-container .content')
  498. var index = $(this).index()
  499. if ($(this).hasClass('active')) {
  500. return
  501. } else {
  502. $('#tabs li').removeClass('active')
  503. $(this).addClass('active')
  504. tabContent.hide().eq(index).fadeIn()
  505. }
  506. })
  507. })
  508. </script>
  509. </body>
  510. </html>