{"id":318,"date":"2023-04-24T17:43:13","date_gmt":"2023-04-24T09:43:13","guid":{"rendered":"https:\/\/www.kenpai.com\/cms\/318\/"},"modified":"2023-04-24T17:43:13","modified_gmt":"2023-04-24T09:43:13","slug":"%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e5%9c%a8wordpress%e4%b8%ad%e4%bd%bf%e7%94%a8iconfont%e5%ad%97%e4%bd%93%e5%9b%be%e6%a0%87","status":"publish","type":"post","link":"https:\/\/www.kenpai.com\/cms\/318\/","title":{"rendered":"\u624b\u628a\u624b\u6559\u4f60\u5728WordPress\u4e2d\u4f7f\u7528Iconfont\u5b57\u4f53\u56fe\u6807"},"content":{"rendered":"<p>Iconfont\uff0c\u4ece\u4e8b\u8bbe\u8ba1\u4e0e\u5f00\u53d1\u7684\u4eba\u5458\u5e94\u8be5\u90fd\u77e5\u9053\uff0c\u8fd9\u662f\u4e00\u4e2aNIU X\u7684\u56fe\u6807\u7ad9\u3002<\/p>\n<p><strong>Iconfont\u7684\u81ea\u6211\u4ecb\u7ecd\uff1a<\/strong><\/p>\n<p>Iconfont\u662f\u963f\u91cc\u5988\u5988MUX\u503e\u529b\u6253\u9020\u7684\u77e2\u91cf\u56fe\u6807\u7ba1\u7406\u3001\u4ea4\u6d41\u5e73\u53f0\u3002\u8bbe\u8ba1\u5e08\u5c06\u56fe\u6807\u4e0a\u4f20\u5230Iconfont\u5e73\u53f0\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4e0b\u8f7d\u591a\u79cd\u683c\u5f0f\u7684icon\uff0c\u5e73\u53f0\u4e5f\u53ef\u5c06\u56fe\u6807\u8f6c\u6362\u4e3a\u5b57\u4f53\uff0c\u4fbf\u4e8e\u524d\u7aef\u5de5\u7a0b\u5e08\u81ea\u7531\u8c03\u6574\u4e0e\u8c03\u7528\u3002<\/p>\n<p>\u53ea\u770b\u4ecb\u7ecd\u53ef\u80fd\u5f88\u96be\u8054\u60f3\u5230\u548cWordPress\u7ad9\u957f\u6709\u4ec0\u4e48\u5173\u7cfb\uff0c\u4f46\u8981\u8bf4\u9053\u5b9e\u7528\u6027\uff0c\u4f30\u8ba1\u6bcf\u4f4d\u7ad9\u957f\u90fd\u89c9\u5f97\u5f88\u8d5e\uff1a<\/p>\n<ul>\n<li>Iconfont\u4e0a\u6709\u6570\u4ee5\u767e\u4e07\u8ba1\u7684\u56fe\u6807\uff08\u76ee\u524d\u4e8c\u767e\u591a\u4e07\u4e2a\u56fe\u6807\uff09\uff0c\u8d21\u732e\u8005\u5f88\u591a\uff1b<\/li>\n<li>\u4f60\u53ef\u4ee5\u5728Iconfont\u4e0a\u9009\u62e9\u81ea\u5df1\u559c\u6b22\u7684\u56fe\u6807\uff1b<\/li>\n<li>\u4f60\u53ef\u4ee5\u5c06\u559c\u6b22\u7684\u56fe\u6807\u7b80\u5355\u7684\u8fd0\u7528\u5230\u81ea\u5df1\u7684\u7f51\u7ad9\u4e0a\uff1b<\/li>\n<li>\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u963f\u91cc\u7684\u5916\u94fe\u56fe\u6807\u6587\u4ef6\uff0c\u901f\u5ea6\u5f88\u5feb\uff0c\u91cd\u8981\u7684\u662f\u8fd8\u652f\u6301https\uff1b<\/li>\n<li>\u6240\u4ee5\uff0c\u4f60\u5e94\u8be5\u60f3\u5c1d\u8bd5\u4e00\u4e0b\u3002<\/li>\n<\/ul>\n<p>\u76ee\u524dIconfont\u652f\u6301\u5fae\u535a\u548cGithub\u8d26\u6237\u7684\u76f4\u63a5\u767b\u5f55\uff0c\u4f60\u6839\u672c\u4e0d\u7528\u6ce8\u518c\uff0c\u53bb\u8bd5\u8bd5\u5427\uff0cIconfont.cn\u3002<\/p>\n<p>\u767b\u5f55\u540e\uff0c\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u5927\u5927\u7684\u641c\u7d22\u6846\uff0c\u7136\u540e\u8f93\u5165\u4f60\u60f3\u8981\u7684\u4e2d\u6587\u6216\u8005\u82f1\u6587\uff0c\u6bd4\u5982\u4f60\u60f3\u8981\u4e00\u4e2a&ldquo;\u9996\u9875&rdquo;\u7684\u56fe\u6807\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u641c\u7d22&ldquo;\u9996\u9875&rdquo;\u6216\u8005&ldquo;\u623f\u5b50&rdquo;\u6765\u67e5\u627e\u3002<\/p>\n<\/p>\n<p>\u6bcf\u4e2a\u56fe\u6807\u4e0a\u90fd\u6709\u4e00\u4e2a\u6dfb\u52a0\u5165\u5e93\u7684\u8d2d\u7269\u8f66\u56fe\u6807\uff0c\u53ea\u9700\u70b9\u51fb\u8fd9\u4e2a\u56fe\u6807\u5373\u53ef\u5c06\u8be5\u56fe\u6807\u6536\u7eb3\u5165\u5e93\u3002<\/p>\n<\/p>\n<p>\u5f53\u4f60\u89c9\u5f97\u6536\u7eb3\u7684\u56fe\u6807\u8db3\u591f\u4e86\u7684\u65f6\u5019\uff0c\u4f60\u53ef\u4ee5\u70b9\u51fb\u9875\u9762\u53f3\u4e0a\u89d2\u7684\u8d2d\u7269\u8f66\u6765&ldquo;\u6dfb\u52a0\u81f3\u9879\u76ee&rdquo;\uff0c\u6ca1\u6709\u9879\u76ee\u7684\u8bdd\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\u3002<\/p>\n<\/p>\n<p>\u7136\u540e\u4f60\u5c31\u6765\u5230\u4e86\u56fe\u6807\u9879\u76ee\u9875\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u521a\u521a\u9009\u62e9\u7684\u6240\u6709\u56fe\u6807\u3002<\/p>\n<\/p>\n<p>\u6d69\u5b50\u8bf4\uff1a\u4e0d\u8981\u5acc\u6211\u5570\u55e6\uff0c\u6211\u73b0\u5728\u627e\u4e00\u4e2a\u56fe\u6807\u901f\u5ea6\u98de\u5feb\uff0c\u56e0\u4e3a\u6d41\u7a0b\u5c31\u8fd9\u4e9b\uff0c\u56fe\u6807\u627e\u597d\u4e86\u5c31\u8981\u7528\u4e0a\uff0c\u7ee7\u7eed\u4e0b\u6587\u3002<\/p>\n<p>Iconfont\u56fe\u6807\u5728\u7f51\u9875\u4e2d\u7684\u8fd0\u7528\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u5728\u56fe\u6807\u9879\u76ee\u9875\u4e2d\u53ef\u4ee5&ldquo;\u67e5\u770b\u5728\u7ebf\u94fe\u63a5&rdquo;\uff0c\u4f60\u5c06\u5f97\u5230\u7c7b\u4f3c\u4e0b\u56fe\u7684\u4ee3\u7801\u3002<\/strong><\/p>\n<\/p>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u5c06\u4ee5\u4e0b\u5168\u90e8\u4ee3\u7801\u590d\u5236\u5230 \u4e3b\u9898\u8bbe\u7f6e-\u81ea\u5b9a\u4e49\u4ee3\u7801-\u81ea\u5b9a\u4e49css\u6837\u5f0f \u4e2d\u3002<\/strong><\/p>\n<p>PS\uff1a\u975ethemebetter\u4e3b\u9898\u53ef\u4ee5\u81ea\u884c\u6dfb\u52a0\u5230\u4e3b\u9898\u4f7f\u7528\u7684\u6837\u5f0f\u8868\u4e2d\uff0c\u4e00\u822c\u662f style.css\u3002<\/p>\n<pre>\/* \u8fd9\u6bb5\u4ee3\u7801\u6539\u6210\u4f60\u81ea\u5df1\u9879\u76ee\u7684\u4ee3\u7801 *\/\n@font-face {\n  font-family: 'iconfont';  \/* project id 554365 *\/\n  src: url('\/\/at.alicdn.com\/t\/font_554365_4c45s45ollgwg66r.eot');\n  src: url('\/\/at.alicdn.com\/t\/font_554365_4c45s45ollgwg66r.eot?#iefix') format('embedded-opentype'),\n  url('\/\/at.alicdn.com\/t\/font_554365_4c45s45ollgwg66r.woff') format('woff'),\n  url('\/\/at.alicdn.com\/t\/font_554365_4c45s45ollgwg66r.ttf') format('truetype'),\n  url('\/\/at.alicdn.com\/t\/font_554365_4c45s45ollgwg66r.svg#iconfont') format('svg');\n}\n\n\/* \u8fd9\u6bb5\u5fc5\u987b\u6709 *\/\n.iconfont{\n  font-family:\"iconfont\" !important;\n  font-style:normal;\n  -webkit-font-smoothing: antialiased;\n  -webkit-text-stroke-width: 0.2px;\n  -moz-osx-font-smoothing: grayscale;\n}<\/pre>\n<p><strong>\u7b2c\u4e09\u6b65\uff1a\u9009\u62e9\u76f8\u5e94\u56fe\u6807\u5e76\u590d\u5236\u56fe\u6807\u4ee3\u7801\uff0c\u5982\uff1a&#xe871; \uff0c\u7136\u540e\u50cf\u4e0b\u9762\u4e00\u6837\u4f7f\u7528\u3002<\/strong><\/p>\n<pre>&lt;i class=\"iconfont\"&gt;&#xe871;&lt;\/i&gt;<\/pre>\n<p><strong>\u7b2c\u56db\u6b65\uff1a\u590d\u5236\u7b2c\u4e09\u6b65\u7684\u5168\u90e8\u4ee3\u7801\u7c98\u8d34\u5230\u4f60\u60f3\u8981\u663e\u793a\u56fe\u6807\u7684\u4f4d\u7f6e\u3002<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u60f3\u5728\u5bfc\u822a\u83dc\u5355\u4e2d\u52a0\u5165\u56fe\u6807\uff0c\u4f60\u9700\u8981\u5c06\u4ee3\u7801\u590d\u5236\u5230 \u5916\u89c2-\u83dc\u5355 \u7684 \u5bfc\u822a\u6807\u7b7e \u4e2d\uff0c\u6bd4\u5982\u4f60\u7684\u5bfc\u822a\u6587\u5b57\u539f\u672c\u662f&ldquo;\u9996\u9875&rdquo;\uff0c\u73b0\u5728\u4f60\u53ea\u9700\u8981\u5728&ldquo;\u9996\u9875&rdquo;\u524d\u9762\u52a0\u4e0a\u7b2c\u4e09\u6b65\u7684\u4ee3\u7801\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u4f60\u60f3\u5728\u6587\u7ae0\u4e2d\u52a0\u5165\u56fe\u6807\uff0c\u4f60\u9700\u8981\u5728\u7f16\u8f91\u6587\u7ae0\u7684\u65f6\u5019\u5207\u6362\u6210\u6587\u672c\u6a21\u5f0f\uff0c\u5c06\u7b2c\u4e09\u6b65\u7684\u4ee3\u7801\u7c98\u8d34\u8fdb\u53bb\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u4f60\u60f3\u4fee\u6539\u4e3b\u9898\u7684\u4ee3\u7801\u5e76\u6dfb\u52a0\u6216\u8005\u66ff\u6362\u56fe\u6807\uff0c\u4f60\u9700\u8981\u627e\u5230\u5408\u9002\u7684\u4f4d\u7f6e\u6765\u653e\u7f6e\u7b2c\u4e09\u6b65\u7684\u4ee3\u7801\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>\u6458\u8981\uff1a<\/strong>\u968f\u4fbf\u9009\u9009\u3001\u590d\u5236\u7c98\u8d34\u4e00\u4e0b\uff0c\u4f60\u5c31\u80fd\u5b9e\u73b0\u9ad8\u5927\u4e0a\u7684\u56fe\u6807\u5c55\u793a<\/p>\n","protected":false},"author":1,"featured_media":446,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3019],"tags":[3107,2997,3108,3109],"class_list":["post-318","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-iconfont","tag-wordpress","tag-wordpress-iconfont","tag-wp-iconfont"],"_links":{"self":[{"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":0,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/posts\/318\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/media\/446"}],"wp:attachment":[{"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/media?parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/categories?post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kenpai.com\/cms\/wp-json\/wp\/v2\/tags?post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}