demo_fontclass.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>IconFont</title>
  6. <link rel="stylesheet" href="demo.css">
  7. <link rel="stylesheet" href="iconfont.css">
  8. </head>
  9. <body>
  10. <div class="main markdown">
  11. <h1>IconFont 图标</h1>
  12. <ul class="icon_lists clear">
  13. <li>
  14. <i class="icon iconfont icon-msnui-poweroff"></i>
  15. <div class="name">关机</div>
  16. <div class="fontclass">.icon-msnui-poweroff</div>
  17. </li>
  18. <li>
  19. <i class="icon iconfont icon-close"></i>
  20. <div class="name">close</div>
  21. <div class="fontclass">.icon-close</div>
  22. </li>
  23. <li>
  24. <i class="icon iconfont icon-shanchu"></i>
  25. <div class="name">删除</div>
  26. <div class="fontclass">.icon-shanchu</div>
  27. </li>
  28. <li>
  29. <i class="icon iconfont icon-quanping"></i>
  30. <div class="name">全屏</div>
  31. <div class="fontclass">.icon-quanping</div>
  32. </li>
  33. <li>
  34. <i class="icon iconfont icon-shanchu1"></i>
  35. <div class="name">删除</div>
  36. <div class="fontclass">.icon-shanchu1</div>
  37. </li>
  38. <li>
  39. <i class="icon iconfont icon-weibiaoti-_huabanfuben"></i>
  40. <div class="name">未标题-1_画板 1 副本 6</div>
  41. <div class="fontclass">.icon-weibiaoti-_huabanfuben</div>
  42. </li>
  43. <li>
  44. <i class="icon iconfont icon-weibiaoti-_huabanfuben1"></i>
  45. <div class="name">未标题-1_画板 1 副本 7</div>
  46. <div class="fontclass">.icon-weibiaoti-_huabanfuben1</div>
  47. </li>
  48. <li>
  49. <i class="icon iconfont icon-weibiaoti-_huabanfuben2"></i>
  50. <div class="name">未标题-1_画板 1 副本 11</div>
  51. <div class="fontclass">.icon-weibiaoti-_huabanfuben2</div>
  52. </li>
  53. <li>
  54. <i class="icon iconfont icon-weibiaoti-_huabanfuben3"></i>
  55. <div class="name">未标题-1_画板 1 副本 10</div>
  56. <div class="fontclass">.icon-weibiaoti-_huabanfuben3</div>
  57. </li>
  58. <li>
  59. <i class="icon iconfont icon-weibiaoti-_huabanfuben4"></i>
  60. <div class="name">未标题-1_画板 1 副本 9</div>
  61. <div class="fontclass">.icon-weibiaoti-_huabanfuben4</div>
  62. </li>
  63. <li>
  64. <i class="icon iconfont icon-weibiaoti-_huabanfuben5"></i>
  65. <div class="name">未标题-1_画板 1 副本 8</div>
  66. <div class="fontclass">.icon-weibiaoti-_huabanfuben5</div>
  67. </li>
  68. <li>
  69. <i class="icon iconfont icon-weibiaoti-_Time-active"></i>
  70. <div class="name">未标题-1_Time-active</div>
  71. <div class="fontclass">.icon-weibiaoti-_Time-active</div>
  72. </li>
  73. <li>
  74. <i class="icon iconfont icon-weibiaoti-_b-active"></i>
  75. <div class="name">未标题-1_b-active</div>
  76. <div class="fontclass">.icon-weibiaoti-_b-active</div>
  77. </li>
  78. <li>
  79. <i class="icon iconfont icon-weibiaoti-_A-active"></i>
  80. <div class="name">未标题-1_A-active</div>
  81. <div class="fontclass">.icon-weibiaoti-_A-active</div>
  82. </li>
  83. <li>
  84. <i class="icon iconfont icon-weibiaoti-_Add-active"></i>
  85. <div class="name">未标题-1_Add-active</div>
  86. <div class="fontclass">.icon-weibiaoti-_Add-active</div>
  87. </li>
  88. <li>
  89. <i class="icon iconfont icon-weibiaoti-_center-active"></i>
  90. <div class="name">未标题-1_center-active</div>
  91. <div class="fontclass">.icon-weibiaoti-_center-active</div>
  92. </li>
  93. <li>
  94. <i class="icon iconfont icon-weibiaoti-_life-active"></i>
  95. <div class="name">未标题-1_life-active</div>
  96. <div class="fontclass">.icon-weibiaoti-_life-active</div>
  97. </li>
  98. <li>
  99. <i class="icon iconfont icon-weibiaoti-_youxu-active"></i>
  100. <div class="name">未标题-1_youxu-active</div>
  101. <div class="fontclass">.icon-weibiaoti-_youxu-active</div>
  102. </li>
  103. <li>
  104. <i class="icon iconfont icon-weibiaoti-_right-active"></i>
  105. <div class="name">未标题-1_right-active</div>
  106. <div class="fontclass">.icon-weibiaoti-_right-active</div>
  107. </li>
  108. <li>
  109. <i class="icon iconfont icon-weibiaoti-_U-active"></i>
  110. <div class="name">未标题-1_U-active</div>
  111. <div class="fontclass">.icon-weibiaoti-_U-active</div>
  112. </li>
  113. <li>
  114. <i class="icon iconfont icon-weibiaoti-_wuxu-active"></i>
  115. <div class="name">未标题-1_wuxu-active</div>
  116. <div class="fontclass">.icon-weibiaoti-_wuxu-active</div>
  117. </li>
  118. <li>
  119. <i class="icon iconfont icon-weibiaoti-_Pic-active"></i>
  120. <div class="name">未标题-1_Pic-active</div>
  121. <div class="fontclass">.icon-weibiaoti-_Pic-active</div>
  122. </li>
  123. <li>
  124. <i class="icon iconfont icon-weibiaoti-_I-active"></i>
  125. <div class="name">未标题-1_I-active</div>
  126. <div class="fontclass">.icon-weibiaoti-_I-active</div>
  127. </li>
  128. <li>
  129. <i class="icon iconfont icon-hebing"></i>
  130. <div class="name">合并 (1)</div>
  131. <div class="fontclass">.icon-hebing</div>
  132. </li>
  133. <li>
  134. <i class="icon iconfont icon-caijian"></i>
  135. <div class="name">裁剪</div>
  136. <div class="fontclass">.icon-caijian</div>
  137. </li>
  138. <li>
  139. <i class="icon iconfont icon-jianqie"></i>
  140. <div class="name">剪切</div>
  141. <div class="fontclass">.icon-jianqie</div>
  142. </li>
  143. <li>
  144. <i class="icon iconfont icon-xunhuan"></i>
  145. <div class="name">循环2</div>
  146. <div class="fontclass">.icon-xunhuan</div>
  147. </li>
  148. </ul>
  149. <h2 id="font-class-">font-class引用</h2>
  150. <hr>
  151. <p>font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。</p>
  152. <p>与unicode使用方式相比,具有如下特点:</p>
  153. <ul>
  154. <li>兼容性良好,支持ie8+,及所有现代浏览器。</li>
  155. <li>相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。</li>
  156. <li>因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。</li>
  157. <li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
  158. </ul>
  159. <p>使用步骤如下:</p>
  160. <h3 id="-fontclass-">第一步:引入项目下面生成的fontclass代码:</h3>
  161. <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;link rel="stylesheet" type="text/css" href="./iconfont.css"&gt;</span></code></pre>
  162. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  163. <pre><code class="lang-css hljs">&lt;<span class="hljs-selector-tag">i</span> <span class="hljs-selector-tag">class</span>="<span class="hljs-selector-tag">iconfont</span> <span class="hljs-selector-tag">icon-xxx</span>"&gt;&lt;/<span class="hljs-selector-tag">i</span>&gt;</code></pre>
  164. <blockquote>
  165. <p>"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
  166. </blockquote>
  167. </div>
  168. </body>
  169. </html>