{"id":3916,"date":"2024-11-10T08:21:14","date_gmt":"2024-11-10T00:21:14","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3916\/"},"modified":"2024-11-10T08:21:14","modified_gmt":"2024-11-10T00:21:14","slug":"%e5%a6%82%e4%bd%95%e5%b0%86-unicode-%e5%ad%97%e7%ac%a6%e8%bd%bb%e6%9d%be%e8%bd%ac%e6%8d%a2%e4%b8%ba-iconfont-%e6%96%87%e6%9c%ac%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3916\/","title":{"rendered":"\u5982\u4f55\u5c06 Unicode \u5b57\u7b26\u8f7b\u677e\u8f6c\u6362\u4e3a iconfont \u6587\u672c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173116423520680.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5c06 Unicode \u5b57\u7b26\u8f7b\u677e\u8f6c\u6362\u4e3a iconfont \u6587\u672c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5c06 Unicode \u5b57\u7b26\u8f7b\u677e\u8f6c\u6362\u4e3a iconfont \u6587\u672c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u8f7b\u677e\u5b9e\u73b0 unicode \u8f6c\u6587\u672c\uff1a\u63a2\u7a76\u6700\u4f73\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728\u65e5\u5e38\u7f16\u7a0b\u4e2d\uff0c\u5c06 Unicode \u5b57\u7b26\u8f6c\u6362\u4e3a\u6587\u672c\u683c\u5f0f\u662f\u4e00\u4e2a\u5e38\u89c1\u9700\u6c42\u3002\u5c24\u5176\u662f\u5bf9\u4e8e\u4f7f\u7528\u5b57\u4f53\u5e93\uff0c\u4f8b\u5982 iconfont\uff0c\u6211\u4eec\u9700\u8981\u5c06 Unicode \u5b57\u7b26\u8f6c\u6362\u6210\u5bf9\u5e94\u7684\u56fe\u6807\u6587\u672c\u3002\u672c\u6587\u5c06\u63a2\u7d22\u4e00\u79cd\u7b80\u5355\u9ad8\u6548\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0 Unicode \u8f6c\u6587\u672c\u7684\u8f6c\u6362\u3002<\/p>\n<p><strong>Unicode \u8f6c\u6587\u672c\u7684\u8f6c\u6362\u95ee\u9898<\/strong><\/p>\n<p>\u5df2\u77e5 iconfont \u5bf9\u5e94\u56fe\u6807\u7684 Unicode\uff0c\u6211\u4eec\u5e0c\u671b\u627e\u5230\u4e00\u79cd\u7c7b\u4f3c fromCharCode API \u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06 Unicode \u8f6c\u6362\u6210 iconfont \u4e2d\u5bf9\u5e94\u7684\u6587\u672c\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a Unicode &#8220;uE683&#8243;\uff0c\u6211\u4eec\u5e0c\u671b\u5f97\u5230\u6587\u672c &#8220;textContent&#8221;\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1aString.fromCharCode(parseInt(unicode.substring(3), 16))<\/strong><\/p>\n<p>\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 JavaScript \u4e2d\u7684 String.fromCharCode() \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06 Unicode \u5b57\u7b26\u4ee3\u7801\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\u3002\u5177\u4f53\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u63d0\u53d6 Unicode \u5b57\u7b26\u7684\u4ee3\u7801\u90e8\u5206\uff1a\u53bb\u6389 Unicode \u524d\u7f00 &#8220;u&#8221;\uff0c\u53ea\u4fdd\u7559\u5341\u516d\u8fdb\u5236\u90e8\u5206\uff0c\u4f8b\u5982\uff0c&#8221;uE683&#8221; \u4e2d\u7684\u4ee3\u7801\u90e8\u5206\u4e3a &#8220;E683&#8243;\u3002<\/li>\n<li>\u4f7f\u7528 parseInt() \u51fd\u6570\u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u4f8b\u5982\uff0c&#8221;E683&#8243; \u8f6c\u6362\u4e3a 58979\u3002<\/li>\n<li>\u4f7f\u7528 String.fromCharCode() \u65b9\u6cd5\u5c06\u6570\u5b57\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\uff0c\u4f8b\u5982\uff0cString.fromCharCode(58979) \u8f6c\u6362\u4e3a &#8220;textContent&#8221;\u3002<\/li>\n<\/ol>\n<p>\u56e0\u6b64\uff0c\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848\u4e3a\uff1a<\/p>\n<pre>String.fromCharCode(parseInt(unicode.substring(3), 16));<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4f7f\u7528\u6b64\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06 Unicode \u5b57\u7b26\u8f6c\u6362\u4e3a iconfont \u4e2d\u5bf9\u5e94\u7684\u6587\u672c\uff0c\u4ece\u800c\u65b9\u4fbf\u5730\u4f7f\u7528\u5b57\u4f53\u5e93\u56fe\u6807\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5c06 Unicode \u5b57\u7b26\u8f7b\u677e\u8f6c\u6362\u4e3a iconfont \u6587\u672c\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f7b\u677e\u5b9e\u73b0 unicode \u8f6c\u6587\u672c\uff1a\u63a2\u7a76\u6700\u4f73\u65b9\u6cd5 \u5728\u65e5\u5e38\u7f16\u7a0b\u4e2d\uff0c\u5c06 Unicode \u5b57\u7b26\u8f6c\u6362\u4e3a\u6587\u672c\u683c\u5f0f\u662f\u4e00\u4e2a\u5e38\u89c1\u9700\u6c42\u3002\u5c24\u5176\u662f\u5bf9\u4e8e\u4f7f\u7528\u5b57\u4f53\u5e93\uff0c\u4f8b\u5982 iconfont\uff0c\u6211\u4eec\u9700\u8981\u5c06 Unicode \u5b57\u7b26\u8f6c\u6362\u6210\u5bf9\u5e94\u7684\u56fe\u6807\u6587\u672c\u3002\u672c\u6587\u5c06\u63a2\u7d22\u4e00\u79cd\u7b80\u5355\u9ad8\u6548\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0 Unicode \u8f6c\u6587\u672c\u7684\u8f6c\u6362\u3002 Unicode \u8f6c\u6587\u672c\u7684\u8f6c\u6362\u95ee\u9898 \u5df2\u77e5 iconfont \u5bf9\u5e94\u56fe\u6807\u7684 Unicode\uff0c\u6211\u4eec\u5e0c\u671b\u627e\u5230\u4e00\u79cd\u7c7b\u4f3c fromCharCode API \u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06 Unicode \u8f6c\u6362\u6210 iconfont \u4e2d\u5bf9\u5e94\u7684\u6587\u672c\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a Unicode &#8220;uE683&#8243;\uff0c\u6211\u4eec\u5e0c\u671b\u5f97\u5230\u6587\u672c &#8220;textContent&#8221;\u3002 \u89e3\u51b3\u65b9\u6848\uff1aString.fromCharCode(parseInt(unicode.substring(3), 16)) \u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 JavaScript \u4e2d\u7684 String.fromCharCode() \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06 Unicode \u5b57\u7b26\u4ee3\u7801\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\u3002\u5177\u4f53\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a \u63d0\u53d6 Unicode \u5b57\u7b26\u7684\u4ee3\u7801\u90e8\u5206\uff1a\u53bb\u6389 Unicode \u524d\u7f00 &#8220;u&#8221;\uff0c\u53ea\u4fdd\u7559\u5341\u516d\u8fdb\u5236\u90e8\u5206\uff0c\u4f8b\u5982\uff0c&#8221;uE683&#8221; \u4e2d\u7684\u4ee3\u7801\u90e8\u5206\u4e3a &#8220;E683&#8243;\u3002 \u4f7f\u7528 parseInt() \u51fd\u6570\u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u4f8b\u5982\uff0c&#8221;E683&#8243; \u8f6c\u6362\u4e3a 58979\u3002 \u4f7f\u7528 String.fromCharCode() \u65b9\u6cd5\u5c06\u6570\u5b57\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\uff0c\u4f8b\u5982\uff0cString.fromCharCode(58979) \u8f6c\u6362\u4e3a &#8220;textContent&#8221;\u3002 \u56e0\u6b64\uff0c\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848\u4e3a\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3916","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3916"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3916\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}