参考:

https://icomoon.io/ 字体图标网站
字体图标使用

实际使用

image.png

  1. @font-face {
  2. font-family: 'icomoon';
  3. src: url('fonts/icomoon.eot?wz20200221');
  4. src: url('fonts/icomoon.eot?wz20200221#iefix') format('embedded-opentype'),
  5. url('fonts/icomoon.ttf?wz20200221') format('truetype'),
  6. url('fonts/icomoon.woff?wz20200221') format('woff'),
  7. url('fonts/icomoon.svg?wz20200221#icomoon') format('svg');
  8. font-weight: normal;
  9. font-style: normal;
  10. font-display: block;
  11. }
  12. [class^="icon-"], [class*=" icon-"] {
  13. /* use !important to prevent issues with browser extensions that change fonts */
  14. font-family: 'icomoon' !important;
  15. speak: none;
  16. font-style: normal;
  17. font-weight: normal;
  18. font-variant: normal;
  19. text-transform: none;
  20. line-height: 1;
  21. /* Better Font Rendering =========== */
  22. -webkit-font-smoothing: antialiased;
  23. -moz-osx-font-smoothing: grayscale;
  24. }
  25. .icon-Private:before {
  26. content: "\e990";
  27. }
  28. .icon-More:before {
  29. content: "\e98c";
  30. }
  31. .icon-Folder:before {
  32. content: "\e98d";
  33. }
  34. .icon-Add:before {
  35. content: "\e98e";
  36. }
  37. .icon-remove:before {
  38. content: "\e98f";
  39. }
  40. .icon-screen:before {
  41. content: "\e98a";
  42. }
  43. .icon-Upload-articles:before {
  44. content: "\e989";
  45. }
  46. .icon-Upload-Video:before {
  47. content: "\e988";
  48. }
  49. .icon-comment:before {
  50. content: "\e987";
  51. }
  52. .icon-link:before {
  53. content: "\e986";
  54. }
  55. .icon-linkopen:before {
  56. content: "\e985";
  57. }
  58. .icon-open:before {
  59. content: "\e984";
  60. }
  61. .icon-menu:before {
  62. content: "\e983";
  63. }
  64. .icon-tag:before {
  65. content: "\e982";
  66. }
  67. .icon-uniE937:before {
  68. content: "\e981";
  69. }
  70. .icon-Mute:before {
  71. content: "\e980";
  72. }
  73. .icon-sound:before {
  74. content: "\e97f";
  75. }
  76. .icon-choice:before {
  77. content: "\e97e";
  78. }
  79. .icon-default:before {
  80. content: "\e97d";
  81. }
  82. .icon-hot:before {
  83. content: "\e97c";
  84. }
  85. .icon-play-volume:before {
  86. content: "\e97b";
  87. }
  88. .icon-time:before {
  89. content: "\e97a";
  90. }
  91. .icon-shopping-line:before {
  92. content: "\e979";
  93. }
  94. .icon-shopping:before {
  95. content: "\e978";
  96. }
  97. .icon-quit:before {
  98. content: "\e98b";
  99. }
  100. .icon-download:before {
  101. content: "\e977";
  102. }
  103. .icon-question:before {
  104. content: "\e976";
  105. }
  106. .icon-delete:before {
  107. content: "\e975";
  108. }
  109. .icon-edit:before {
  110. content: "\e974";
  111. }
  112. .icon-qr:before {
  113. content: "\e973";
  114. }
  115. .icon-stick:before {
  116. content: "\e972";
  117. }
  118. .icon-arrow-left-light:before {
  119. content: "\e971";
  120. }
  121. .icon-arrow-right-light:before {
  122. content: "\e970";
  123. }
  124. .icon-activity:before {
  125. content: "\e96f";
  126. }
  127. .icon-share:before {
  128. content: "\e96e";
  129. }
  130. .icon-cup:before {
  131. content: "\e96d";
  132. }
  133. .icon-equipment:before {
  134. content: "\e96c";
  135. }
  136. .icon-still:before {
  137. content: "\e96b";
  138. }
  139. .icon-arrow-down:before {
  140. content: "\e96a";
  141. }
  142. .icon-arrow-up:before {
  143. content: "\e969";
  144. }
  145. .icon-minus:before {
  146. content: "\e968";
  147. }
  148. .icon-music-stop:before {
  149. content: "\e967";
  150. }
  151. .icon-music:before {
  152. content: "\e966";
  153. }
  154. .icon-triangle-down:before {
  155. content: "\e965";
  156. }
  157. .icon-triangle-up:before {
  158. content: "\e964";
  159. }
  160. .icon-video:before {
  161. content: "\e963";
  162. }
  163. .icon-arrow-left:before {
  164. content: "\e962";
  165. }
  166. .icon-arrow-right:before {
  167. content: "\e961";
  168. }
  169. .icon-authorization-1:before {
  170. content: "\e960";
  171. }
  172. .icon-authorization-2:before {
  173. content: "\e95f";
  174. }
  175. .icon-authorization-3:before {
  176. content: "\e95e";
  177. }
  178. .icon-authorization-4:before {
  179. content: "\e95d";
  180. }
  181. .icon-career:before {
  182. content: "\e95c";
  183. }
  184. .icon-close:before {
  185. content: "\e95b";
  186. }
  187. .icon-like:before {
  188. content: "\e95a";
  189. }
  190. .icon-location:before {
  191. content: "\e959";
  192. }
  193. .icon-logo:before {
  194. content: "\e958";
  195. color: #e74b3b;
  196. }
  197. .icon-message:before {
  198. content: "\e957";
  199. }
  200. .icon-play:before {
  201. content: "\e956";
  202. }
  203. .icon-plus:before {
  204. content: "\e955";
  205. }
  206. .icon-private:before {
  207. content: "\e954";
  208. }
  209. .icon-qzone:before {
  210. content: "\e953";
  211. }
  212. .icon-right:before {
  213. content: "\e952";
  214. }
  215. .icon-search:before {
  216. content: "\e951";
  217. }
  218. .icon-weibo:before {
  219. content: "\e950";
  220. }
  221. .icon-weixin:before {
  222. content: "\e94f";
  223. }
  224. .icon-qq:before {
  225. content: "\e94e";
  226. }
  227. .icon-arrow-top:before {
  228. content: "\e94d";
  229. }
  230. .icon-iphone:before {
  231. content: "\e94c";
  232. }
  233. .icon-network:before {
  234. content: "\e94b";
  235. }

某次想参照别的关闭按钮,只设置了content,并没有展示出来
image.png
后来才发现需要指定对应字体,也就是别的地方同时需要加上icon-close 类名的作用
image.png

  1. [class^="icon-"], [class*=" icon-"] {
  2. /* use !important to prevent issues with browser extensions that change fonts */
  3. font-family: 'icomoon' !important;
  4. speak: none;
  5. font-style: normal;
  6. font-weight: normal;
  7. font-variant: normal;
  8. text-transform: none;
  9. line-height: 1;