{"id":52129,"date":"2024-12-03T12:04:43","date_gmt":"2024-12-03T04:04:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52129\/"},"modified":"2024-12-03T12:04:43","modified_gmt":"2024-12-03T04:04:43","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e7%9a%84%e5%90%88%e5%b9%b6%e5%b9%b6%e7%a1%ae%e4%bf%9d%e5%85%b6%e5%9c%a8%e4%b8%8d%e5%90%8c%e9%a1%b5%e9%9d%a2%e5%a4%a7%e5%b0%8f-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52129\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f <\/h1>\n<p>\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u5e26\u6765\u4e86<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f \u300b<\/span>\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u77e5\u8bc6\u70b9\u5305\u62ec<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u65e0\u8bba\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u8001\u624b\uff0c\u90fd\u9002\u5408\u770b\u4e00\u770b\u54e6~\u6709\u597d\u7684\u5efa\u8bae\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u7559\u8a00\uff0c\u82e5\u662f\u770b\u5b8c\u6709\u6240\u6536\u83b7\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u70b9\u8d5e\u652f\u6301\u5440\uff01\u4e00\u8d77\u52a0\u6cb9\u5b66\u4e60~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241119\/1731987377673c07b1747d6.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5c06\u4e24\u5f20\u56fe\u7247\u5408\u5e76\u5e76\u9002\u914d\u4e0d\u540c\u9875\u9762\u5927\u5c0f\uff1f<\/strong><\/p>\n<p><strong>\u95ee\u9898\u63cf\u8ff0\uff1a<\/strong><\/p>\n<p>\u60f3\u8981\u5408\u5e76\u4e24\u5f20\u56fe\u7247\uff0c\u5e76\u4f7f\u5176\u5728\u6240\u6709\u5927\u5c0f\u7684\u9875\u9762\u4e2d\u4fdd\u6301\u9002\u5e94\u6027\u3002\u4f7f\u7528\u7edd\u5bf9\u5b9a\u4f4d\u5b9e\u73b0\u540e\u53d1\u73b0\uff0c\u9875\u9762\u5927\u5c0f\u6539\u53d8\u540e\u56fe\u7247\u4f4d\u7f6e\u4f1a\u51fa\u73b0\u504f\u79fb\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u52a8\u6001\u5355\u4f4d\u914d\u5408\u54cd\u5e94\u5f0f\u5e03\u5c40\u3002<\/p>\n<p><strong>\u52a8\u6001\u5355\u4f4d<\/strong><\/p>\n<p>vw\u548crem\u7b49\u52a8\u6001\u5355\u4f4d\u53ef\u4ee5\u6839\u636e\u8bbe\u5907\u53ef\u89c6\u5bbd\u5ea6\u6216\u9875\u9762\u6839\u5143\u7d20\u7684\u5b57\u4f53\u5927\u5c0f\u81ea\u52a8\u8c03\u6574\u5c3a\u5bf8\u3002<\/p>\n<p><strong>rem\u65b9\u5f0f<\/strong><\/p>\n<ol>\n<li>\u4f7f\u7528JavaScript\u52a8\u6001\u8ba1\u7b97\u6839\u5143\u7d20\u5b57\u4f53\u5927\u5c0f\uff1a<\/li>\n<\/ol>\n<pre>function refreshRem(){\n    const whdef = 100 \/ 750\n    const bodyWidth = document.body.clientWidth\n    const rem = whdef * bodyWidth\n    document.getElementsByTagName('html')['0'].style.fontSize = `${rem}px`\n}<\/pre>\n<ol>\n<li>\u6839\u636e\u8bbe\u5907\u5bbd\u5ea6\u8c03\u6574\u6839\u5143\u7d20\u5b57\u4f53\u5927\u5c0f\uff0c\u4ece\u800c\u5b9e\u73b0\u54cd\u5e94\u5f0f\u5e03\u5c40\u3002<\/li>\n<\/ol>\n<p><strong>input\u6846\u6837\u5f0f<\/strong><\/p>\n<p>\u8f93\u5165\u6846\u53ef\u4ee5\u4f7f\u7528CSS\u5b9e\u73b0\uff0c\u4e0d\u9700\u8981\u4f7f\u7528\u56fe\u7247\u3002<\/p>\n<pre>.input{\n    width:20vw;\n    height:3vw;\n    line-height: 3vw;\n    font-size: 1.5vw;\n    border: none;\n    outline: none;\n    border-radius:2vw;\n    background:url(https:\/\/i.328888.xyz\/2023\/04\/06\/iITckN.png) #fefdd7 17vw center\/2vw 2vw no-repeat;\n    box-shadow:0 3px 0 0 #705048;\n    position:relative;\n    box-sizing: border-box;\n    padding:0 4vw 0 2vw;\n}<\/pre>\n<p><strong>\u6548\u679c\u56fe\uff1a<\/strong><\/p>\n<p>[\u56fe\u7247\u6548\u679c\u56fe]<\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u6211\u4eec\u4e5f\u5c31\u8bb2\u5b8c\u4e86\u300a\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f \u300b\u7684\u5185\u5bb9\u4e86\u3002\u4e2a\u4eba\u8ba4\u4e3a\uff0c\u57fa\u7840\u77e5\u8bc6\u7684\u5b66\u4e60\u548c\u5de9\u56fa\uff0c\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5c06\u5176\u8fd0\u7528\u5230\u9879\u76ee\u4e2d\uff0c\u6b22\u8fce\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u5e26\u4f60\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u7684\u77e5\u8bc6\u70b9\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   Win11\u4efb\u52a1\u680f\u65e0\u53cd\u5e94\u600e\u4e48\u89e3\u51b3 Win11\u70b9\u51fb\u4efb\u52a1\u680f\u65e0\u53cd\u5e94\u89e3\u51b3\u529e\u6cd5\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f \u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u5e26\u6765\u4e86\u300a\u5982\u4f55\u5b9e\u73b0\u4e24\u5f20\u56fe\u7247\u7684\u5408\u5e76\u5e76\u786e\u4fdd\u5176\u5728\u4e0d\u540c\u9875\u9762\u5927\u5c0f\u4e0b\u90fd\u80fd\u5b8c\u7f8e\u9002\u914d\uff1f \u300b\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u77e5\u8bc6\u70b9\u5305\u62ec\u7b49\u7b49\uff0c\u65e0\u8bba\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u8001\u624b\uff0c\u90fd\u9002\u5408\u770b\u4e00\u770b\u54e6~\u6709\u597d\u7684\u5efa\u8bae\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u7559\u8a00\uff0c\u82e5\u662f\u770b\u5b8c\u6709\u6240\u6536\u83b7\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u70b9\u8d5e\u652f\u6301\u5440\uff01\u4e00\u8d77\u52a0\u6cb9\u5b66\u4e60~ \u5982\u4f55\u5c06\u4e24\u5f20\u56fe\u7247\u5408\u5e76\u5e76\u9002\u914d\u4e0d\u540c\u9875\u9762\u5927\u5c0f\uff1f \u95ee\u9898\u63cf\u8ff0\uff1a \u60f3\u8981\u5408\u5e76\u4e24\u5f20\u56fe\u7247\uff0c\u5e76\u4f7f\u5176\u5728\u6240\u6709\u5927\u5c0f\u7684\u9875\u9762\u4e2d\u4fdd\u6301\u9002\u5e94\u6027\u3002\u4f7f\u7528\u7edd\u5bf9\u5b9a\u4f4d\u5b9e\u73b0\u540e\u53d1\u73b0\uff0c\u9875\u9762\u5927\u5c0f\u6539\u53d8\u540e\u56fe\u7247\u4f4d\u7f6e\u4f1a\u51fa\u73b0\u504f\u79fb\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u52a8\u6001\u5355\u4f4d\u914d\u5408\u54cd\u5e94\u5f0f\u5e03\u5c40\u3002 \u52a8\u6001\u5355\u4f4d vw\u548crem\u7b49\u52a8\u6001\u5355\u4f4d\u53ef\u4ee5\u6839\u636e\u8bbe\u5907\u53ef\u89c6\u5bbd\u5ea6\u6216\u9875\u9762\u6839\u5143\u7d20\u7684\u5b57\u4f53\u5927\u5c0f\u81ea\u52a8\u8c03\u6574\u5c3a\u5bf8\u3002 rem\u65b9\u5f0f \u4f7f\u7528JavaScript\u52a8\u6001\u8ba1\u7b97\u6839\u5143\u7d20\u5b57\u4f53\u5927\u5c0f\uff1a function refreshRem(){ const whdef = 100 \/ 750 const bodyWidth = document.body.clientWidth const rem = whdef * bodyWidth document.getElementsByTagName(&#8216;html&#8217;)[&#8216;0&#8217;].style.fontSize = `${rem}px` } \u6839\u636e\u8bbe\u5907\u5bbd\u5ea6\u8c03\u6574\u6839\u5143\u7d20\u5b57\u4f53\u5927\u5c0f\uff0c\u4ece\u800c\u5b9e\u73b0\u54cd\u5e94\u5f0f\u5e03\u5c40\u3002 input\u6846\u6837\u5f0f \u8f93\u5165\u6846\u53ef\u4ee5\u4f7f\u7528CSS\u5b9e\u73b0\uff0c\u4e0d\u9700\u8981\u4f7f\u7528\u56fe\u7247\u3002 .input{ width:20vw; height:3vw; line-height: 3vw; font-size: 1.5vw; border: none; outline: none; border-radius:2vw; background:url(https:\/\/i.328888.xyz\/2023\/04\/06\/iITckN.png) #fefdd7 17vw center\/2vw 2vw no-repeat; [&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-52129","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52129","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=52129"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52129\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}