demo_fontclass.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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-add"></i>
  15. <div class="name">add</div>
  16. <div class="fontclass">.icon-add</div>
  17. </li>
  18. <li>
  19. <i class="icon iconfont icon-gongdan"></i>
  20. <div class="name">gongdan2</div>
  21. <div class="fontclass">.icon-gongdan</div>
  22. </li>
  23. <li>
  24. <i class="icon iconfont icon-gongdan1"></i>
  25. <div class="name">gongdan</div>
  26. <div class="fontclass">.icon-gongdan1</div>
  27. </li>
  28. <li>
  29. <i class="icon iconfont icon-home"></i>
  30. <div class="name">home</div>
  31. <div class="fontclass">.icon-home</div>
  32. </li>
  33. <li>
  34. <i class="icon iconfont icon-more"></i>
  35. <div class="name">more</div>
  36. <div class="fontclass">.icon-more</div>
  37. </li>
  38. <li>
  39. <i class="icon iconfont icon-message"></i>
  40. <div class="name">message</div>
  41. <div class="fontclass">.icon-message</div>
  42. </li>
  43. <li>
  44. <i class="icon iconfont icon-peo"></i>
  45. <div class="name">peo2</div>
  46. <div class="fontclass">.icon-peo</div>
  47. </li>
  48. <li>
  49. <i class="icon iconfont icon-people"></i>
  50. <div class="name">people</div>
  51. <div class="fontclass">.icon-people</div>
  52. </li>
  53. <li>
  54. <i class="icon iconfont icon-peo1"></i>
  55. <div class="name">peo3</div>
  56. <div class="fontclass">.icon-peo1</div>
  57. </li>
  58. <li>
  59. <i class="icon iconfont icon-search"></i>
  60. <div class="name">search</div>
  61. <div class="fontclass">.icon-search</div>
  62. </li>
  63. <li>
  64. <i class="icon iconfont icon-sort"></i>
  65. <div class="name">sort1</div>
  66. <div class="fontclass">.icon-sort</div>
  67. </li>
  68. <li>
  69. <i class="icon iconfont icon-start"></i>
  70. <div class="name">start</div>
  71. <div class="fontclass">.icon-start</div>
  72. </li>
  73. <li>
  74. <i class="icon iconfont icon-start1"></i>
  75. <div class="name">start 2</div>
  76. <div class="fontclass">.icon-start1</div>
  77. </li>
  78. <li>
  79. <i class="icon iconfont icon-anquancanshu"></i>
  80. <div class="name">安全参数</div>
  81. <div class="fontclass">.icon-anquancanshu</div>
  82. </li>
  83. <li>
  84. <i class="icon iconfont icon-dangqianbaojing"></i>
  85. <div class="name">当前报警</div>
  86. <div class="fontclass">.icon-dangqianbaojing</div>
  87. </li>
  88. <li>
  89. <i class="icon iconfont icon-huanjing"></i>
  90. <div class="name">环境</div>
  91. <div class="fontclass">.icon-huanjing</div>
  92. </li>
  93. <li>
  94. <i class="icon iconfont icon-huanjinglogo"></i>
  95. <div class="name">环境logo</div>
  96. <div class="fontclass">.icon-huanjinglogo</div>
  97. </li>
  98. <li>
  99. <i class="icon iconfont icon-huiyuanmanyidu"></i>
  100. <div class="name">会员满意度</div>
  101. <div class="fontclass">.icon-huiyuanmanyidu</div>
  102. </li>
  103. <li>
  104. <i class="icon iconfont icon-jiancedian"></i>
  105. <div class="name">监测点</div>
  106. <div class="fontclass">.icon-jiancedian</div>
  107. </li>
  108. <li>
  109. <i class="icon iconfont icon-lengzhanlogo"></i>
  110. <div class="name">冷站logo</div>
  111. <div class="fontclass">.icon-lengzhanlogo</div>
  112. </li>
  113. <li>
  114. <i class="icon iconfont icon-nengyuanlogo"></i>
  115. <div class="name">能源logo</div>
  116. <div class="fontclass">.icon-nengyuanlogo</div>
  117. </li>
  118. <li>
  119. <i class="icon iconfont icon-pingfen"></i>
  120. <div class="name">评分</div>
  121. <div class="fontclass">.icon-pingfen</div>
  122. </li>
  123. <li>
  124. <i class="icon iconfont icon-peidianlogo"></i>
  125. <div class="name">配电logo</div>
  126. <div class="fontclass">.icon-peidianlogo</div>
  127. </li>
  128. <li>
  129. <i class="icon iconfont icon-qushi"></i>
  130. <div class="name">趋势</div>
  131. <div class="fontclass">.icon-qushi</div>
  132. </li>
  133. <li>
  134. <i class="icon iconfont icon-qiangdianzhuanyexitong"></i>
  135. <div class="name">强电专业系统</div>
  136. <div class="fontclass">.icon-qiangdianzhuanyexitong</div>
  137. </li>
  138. <li>
  139. <i class="icon iconfont icon-shenghuoreshui"></i>
  140. <div class="name">生活热水</div>
  141. <div class="fontclass">.icon-shenghuoreshui</div>
  142. </li>
  143. <li>
  144. <i class="icon iconfont icon-xiangmudafenbiao"></i>
  145. <div class="name">项目打分表</div>
  146. <div class="fontclass">.icon-xiangmudafenbiao</div>
  147. </li>
  148. <li>
  149. <i class="icon iconfont icon-kongzhuangtaiicon"></i>
  150. <div class="name">空状态icon</div>
  151. <div class="fontclass">.icon-kongzhuangtaiicon</div>
  152. </li>
  153. <li>
  154. <i class="icon iconfont icon-tongjifenxiblue"></i>
  155. <div class="name">统计分析blue</div>
  156. <div class="fontclass">.icon-tongjifenxiblue</div>
  157. </li>
  158. <li>
  159. <i class="icon iconfont icon-yujing"></i>
  160. <div class="name">预警</div>
  161. <div class="fontclass">.icon-yujing</div>
  162. </li>
  163. <li>
  164. <i class="icon iconfont icon-zonglan"></i>
  165. <div class="name">总览</div>
  166. <div class="fontclass">.icon-zonglan</div>
  167. </li>
  168. <li>
  169. <i class="icon iconfont icon-zulinlogo"></i>
  170. <div class="name">租赁logo</div>
  171. <div class="fontclass">.icon-zulinlogo</div>
  172. </li>
  173. <li>
  174. <i class="icon iconfont icon-zhanghao"></i>
  175. <div class="name">账号</div>
  176. <div class="fontclass">.icon-zhanghao</div>
  177. </li>
  178. <li>
  179. <i class="icon iconfont icon-close"></i>
  180. <div class="name">close</div>
  181. <div class="fontclass">.icon-close</div>
  182. </li>
  183. <li>
  184. <i class="icon iconfont icon-mima"></i>
  185. <div class="name">密码</div>
  186. <div class="fontclass">.icon-mima</div>
  187. </li>
  188. <li>
  189. <i class="icon iconfont icon-meos"></i>
  190. <div class="name">meos</div>
  191. <div class="fontclass">.icon-meos</div>
  192. </li>
  193. </ul>
  194. <h2 id="font-class-">font-class引用</h2>
  195. <hr>
  196. <p>font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。</p>
  197. <p>与unicode使用方式相比,具有如下特点:</p>
  198. <ul>
  199. <li>兼容性良好,支持ie8+,及所有现代浏览器。</li>
  200. <li>相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。</li>
  201. <li>因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。</li>
  202. <li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
  203. </ul>
  204. <p>使用步骤如下:</p>
  205. <h3 id="-fontclass-">第一步:引入项目下面生成的fontclass代码:</h3>
  206. <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>
  207. <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
  208. <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>
  209. <blockquote>
  210. <p>"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
  211. </blockquote>
  212. </div>
  213. </body>
  214. </html>