{"id":1093,"date":"2025-12-31T17:26:05","date_gmt":"2025-12-31T09:26:05","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=1093"},"modified":"2025-12-31T17:26:05","modified_gmt":"2025-12-31T09:26:05","slug":"%e5%89%8d%e7%ab%af%e9%9d%a2%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/31\/%e5%89%8d%e7%ab%af%e9%9d%a2%e8%af%95\/","title":{"rendered":"\u524d\u7aef\u9762\u8bd5"},"content":{"rendered":"\n<p>\u4f60\u8bf4\u7684 <strong>\u201c\u524d\u7aef\u9762\u8bd5\u201d<\/strong> \u53ef\u4ee5\u5206\u4e3a\u51e0\u4e2a\u65b9\u5411\uff1a<strong>\u57fa\u7840\u77e5\u8bc6\u3001\u5b9e\u6218\u6280\u80fd\u3001\u6846\u67b6\u5e93\u3001\u9879\u76ee\u7ecf\u9a8c\u4ee5\u53ca\u9762\u8bd5\u6280\u5de7<\/strong>\u3002\u6211\u5e2e\u4f60\u6574\u7406\u4e00\u4efd <strong>\u6700\u5168\u9762\u3001\u6700\u5b9e\u7528\u7684\u524d\u7aef\u9762\u8bd5\u5168\u653b\u7565<\/strong>\uff0c\u9002\u5408\u81ea\u6d4b\u3001\u590d\u4e60\u548c\u5237\u9898\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u524d\u7aef\u9762\u8bd5\u5e38\u8003\u65b9\u5411<\/h2>\n\n\n\n<p>1\ufe0f\u20e3 <strong>HTML \/ CSS \/ \u6d4f\u89c8\u5668\u539f\u7406<\/strong><br>2\ufe0f\u20e3 <strong>JavaScript \u57fa\u7840\u4e0e\u9ad8\u7ea7<\/strong><br>3\ufe0f\u20e3 <strong>\u6846\u67b6\u4e0e\u5e93<\/strong>\uff08React \/ Vue \/ Angular\uff09<br>4\ufe0f\u20e3 <strong>\u524d\u7aef\u5de5\u7a0b\u5316<\/strong>\uff08Webpack \/ Vite \/ Node \/ npm\uff09<br>5\ufe0f\u20e3 <strong>\u7f51\u7edc\u4e0e\u6027\u80fd<\/strong>\uff08HTTP \/ TCP \/\u7f13\u5b58 \/\u6027\u80fd\u4f18\u5316\uff09<br>6\ufe0f\u20e3 <strong>\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5<\/strong><br>7\ufe0f\u20e3 <strong>\u9879\u76ee\u7ecf\u9a8c \/ \u5b9e\u6218\u9898<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u91cd\u70b9\u77e5\u8bc6\u70b9<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1\ufe0f\u20e3 HTML \/ CSS<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HTML<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u8bed\u4e49\u5316\u6807\u7b7e\uff08<code>&lt;header><\/code> <code>&lt;article><\/code> <code>&lt;main><\/code>\uff09<\/li>\n\n\n\n<li>\u8868\u5355\u5143\u7d20\uff08<code>&lt;input><\/code>\u3001<code>&lt;select><\/code>\uff09<\/li>\n\n\n\n<li>\u5143\u7d20\u5c5e\u6027\uff08<code>data-*<\/code>\u3001<code>contenteditable<\/code>\uff09<\/li>\n\n\n\n<li>DOM \u7ed3\u6784\u4e0e\u8282\u70b9\u7c7b\u578b<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>CSS<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u76d2\u6a21\u578b\uff08<code>content-box<\/code> vs <code>border-box<\/code>\uff09<\/li>\n\n\n\n<li>Flex \/ Grid \u5e03\u5c40<\/li>\n\n\n\n<li>CSS \u4f18\u5148\u7ea7 \/ \u5c42\u53e0\u89c4\u5219<\/li>\n\n\n\n<li>\u54cd\u5e94\u5f0f\u8bbe\u8ba1 &amp; \u5a92\u4f53\u67e5\u8be2<\/li>\n\n\n\n<li>CSS \u52a8\u753b \/ \u8fc7\u6e21 \/ transform<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5e38\u89c1\u9762\u8bd5\u9898<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>position: absolute<\/code> \u4e0e <code>relative<\/code> \u533a\u522b<\/li>\n\n\n\n<li>z-index \u5982\u4f55\u751f\u6548<\/li>\n\n\n\n<li>\u6c34\u5e73\u5782\u76f4\u5c45\u4e2d\u5b9e\u73b0\u65b9\u6cd5<\/li>\n\n\n\n<li>CSS3 \u65b0\u7279\u6027\uff08\u53d8\u91cf\u3001calc\u3001clamp\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2\ufe0f\u20e3 JavaScript<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u57fa\u7840<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u6570\u636e\u7c7b\u578b \/ \u7c7b\u578b\u8f6c\u6362 \/ == vs ===<\/li>\n\n\n\n<li>\u4f5c\u7528\u57df \/ \u95ed\u5305 \/ \u53d8\u91cf\u63d0\u5347 \/ this<\/li>\n\n\n\n<li>\u539f\u578b\u94fe \/ \u7ee7\u627f \/ instanceof<\/li>\n\n\n\n<li>\u6570\u7ec4 \/ \u5bf9\u8c61\u65b9\u6cd5\uff08map\/filter\/reduce\uff09<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u9ad8\u7ea7<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5f02\u6b65\uff08Promise \/ async\/await \/ \u56de\u8c03\uff09<\/li>\n\n\n\n<li>Event Loop \/ \u5fae\u4efb\u52a1 &amp; \u5b8f\u4efb\u52a1<\/li>\n\n\n\n<li>\u6df1\u6d45\u62f7\u8d1d<\/li>\n\n\n\n<li>\u9632\u6296 \/ \u8282\u6d41<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u6d4f\u89c8\u5668\u76f8\u5173<\/strong>\n<ul class=\"wp-block-list\">\n<li>DOM \u64cd\u4f5c<\/li>\n\n\n\n<li>BOM\uff08location \/ history \/ navigator\uff09<\/li>\n\n\n\n<li>\u4e8b\u4ef6\u59d4\u6258 \/ \u6355\u83b7 &amp; \u5192\u6ce1<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5e38\u89c1\u9762\u8bd5\u9898<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>Object.keys<\/code> \/ <code>Object.values<\/code> \/ <code>Object.entries<\/code><\/li>\n\n\n\n<li><code>setTimeout<\/code> 0 \u5ef6\u65f6\u6267\u884c\u987a\u5e8f<\/li>\n\n\n\n<li>\u95ed\u5305\u5b9e\u73b0\u79c1\u6709\u53d8\u91cf<\/li>\n\n\n\n<li>\u9632\u6296\u548c\u8282\u6d41\u5b9e\u73b0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3\ufe0f\u20e3 \u6846\u67b6\u4e0e\u5e93<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>React<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u865a\u62df DOM\u3001\u7ec4\u4ef6\u751f\u547d\u5468\u671f\u3001Hooks<\/li>\n\n\n\n<li>\u72b6\u6001\u7ba1\u7406\uff08useState \/ Redux \/ Context\uff09<\/li>\n\n\n\n<li>\u6027\u80fd\u4f18\u5316\uff08memo \/ useCallback \/ lazy loading\uff09<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Vue<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u54cd\u5e94\u5f0f\u539f\u7406\uff08Proxy \/ defineProperty\uff09<\/li>\n\n\n\n<li>\u7ec4\u4ef6\u901a\u4fe1\uff08props \/ emit \/ provide\/inject \/ Vuex\uff09<\/li>\n\n\n\n<li>\u751f\u547d\u5468\u671f \/ computed \/ watch<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5e38\u89c1\u9762\u8bd5\u9898<\/strong>\n<ul class=\"wp-block-list\">\n<li>React vs Vue \u4f18\u7f3a\u70b9<\/li>\n\n\n\n<li>key \u7684\u4f5c\u7528<\/li>\n\n\n\n<li>v-if vs v-show<\/li>\n\n\n\n<li>React setState \u5f02\u6b65\u95ee\u9898<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4\ufe0f\u20e3 \u524d\u7aef\u5de5\u7a0b\u5316<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>npm \/ yarn \u5305\u7ba1\u7406<\/li>\n\n\n\n<li>Webpack \/ Vite \u6784\u5efa<\/li>\n\n\n\n<li>Babel \u8f6c\u7801<\/li>\n\n\n\n<li>ESLint \/ Prettier<\/li>\n\n\n\n<li>\u6a21\u5757\u5316\uff1aES6 Module \/ CommonJS \/ UMD<\/li>\n\n\n\n<li><strong>\u5e38\u89c1\u9762\u8bd5\u9898<\/strong>\n<ul class=\"wp-block-list\">\n<li>webpack loader vs plugin<\/li>\n\n\n\n<li>tree shaking \u539f\u7406<\/li>\n\n\n\n<li>\u70ed\u66f4\u65b0 HMR \u5de5\u4f5c\u539f\u7406<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5\ufe0f\u20e3 \u7f51\u7edc\u4e0e\u6027\u80fd<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HTTP \/ HTTPS \/ TCP \/ UDP<\/li>\n\n\n\n<li>\u8bf7\u6c42\u65b9\u6cd5\uff1aGET \/ POST \/ PUT \/ DELETE<\/li>\n\n\n\n<li>\u72b6\u6001\u7801\uff08200 \/ 301 \/ 302 \/ 404 \/ 500\uff09<\/li>\n\n\n\n<li>Cookie \/ LocalStorage \/ SessionStorage \/ Token<\/li>\n\n\n\n<li>\u6d4f\u89c8\u5668\u7f13\u5b58\uff1a\u5f3a\u5236\u7f13\u5b58 \/ \u534f\u5546\u7f13\u5b58<\/li>\n\n\n\n<li>\u524d\u7aef\u6027\u80fd\u4f18\u5316\uff1a\n<ul class=\"wp-block-list\">\n<li>\u56fe\u7247\u538b\u7f29 \/ CDN \/ lazy load<\/li>\n\n\n\n<li>\u8d44\u6e90\u5408\u5e76 \/ \u4ee3\u7801\u5206\u5272<\/li>\n\n\n\n<li>\u524d\u7aef\u76d1\u63a7 &amp; \u6027\u80fd\u5206\u6790\uff08Lighthouse \/ Chrome DevTools\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6\ufe0f\u20e3 \u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\uff08\u524d\u7aef\u5e38\u8003\uff09<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u7ec4 \/ \u94fe\u8868 \/ \u6808 \/ \u961f\u5217 \/ \u96c6\u5408<\/li>\n\n\n\n<li>\u5b57\u7b26\u4e32\u5904\u7406<\/li>\n\n\n\n<li>\u6392\u5e8f \/ \u67e5\u627e<\/li>\n\n\n\n<li>\u6808\u5b9e\u73b0\u62ec\u53f7\u5339\u914d<\/li>\n\n\n\n<li>\u9762\u8bd5\u9898\uff1a\n<ul class=\"wp-block-list\">\n<li>\u5b9e\u73b0 <code>Array.prototype.map<\/code><\/li>\n\n\n\n<li>\u6570\u7ec4\u53bb\u91cd<\/li>\n\n\n\n<li>\u6c42\u6570\u7ec4\u6700\u5927\u5b50\u5e8f\u5217\u548c<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7\ufe0f\u20e3 \u9879\u76ee\u7ecf\u9a8c<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9879\u76ee\u80cc\u666f\u3001\u804c\u8d23<\/li>\n\n\n\n<li>\u6280\u672f\u6808<\/li>\n\n\n\n<li>\u9047\u5230\u7684\u56f0\u96be\u548c\u89e3\u51b3\u65b9\u6848<\/li>\n\n\n\n<li>\u6027\u80fd\u4f18\u5316\u6848\u4f8b<\/li>\n\n\n\n<li>\u9875\u9762\u517c\u5bb9\u6027\u95ee\u9898\u5904\u7406<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u524d\u7aef\u9762\u8bd5\u9898\u793a\u4f8b<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>JS \u95ed\u5305\u5e94\u7528\u573a\u666f\uff1f<\/li>\n\n\n\n<li>\u89e3\u91ca event loop \u5de5\u4f5c\u539f\u7406<\/li>\n\n\n\n<li>\u5199\u4e00\u4e2a\u9632\u6296\u51fd\u6570<\/li>\n\n\n\n<li>React \u5982\u4f55\u907f\u514d\u91cd\u590d\u6e32\u67d3\uff1f<\/li>\n\n\n\n<li>CSS \u6c34\u5e73\u5782\u76f4\u5c45\u4e2d 3 \u79cd\u65b9\u6cd5<\/li>\n\n\n\n<li>HTTP 301 \u548c 302 \u533a\u522b<\/li>\n\n\n\n<li>Vue \u54cd\u5e94\u5f0f\u539f\u7406<\/li>\n\n\n\n<li>Array \u53bb\u91cd\u65b9\u6cd5\uff08Set \/ filter \/ reduce\uff09<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u9762\u8bd5\u6280\u5de7<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u8bf4\u7ed3\u6784\uff0c\u4e0d\u8bf4\u8bed\u6cd5<\/strong>\uff1a\u5c3d\u91cf\u7528\u56fe\/\u6d41\u7a0b\u63cf\u8ff0<\/li>\n\n\n\n<li><strong>\u9047\u5230\u4e0d\u4f1a\u7684\u9898<\/strong>\uff1a\u62c6\u89e3\u95ee\u9898\uff0c\u5c55\u793a\u601d\u8def<\/li>\n\n\n\n<li><strong>\u9879\u76ee\u7ecf\u9a8c\u4f18\u5148<\/strong>\uff1a\u628a\u9879\u76ee\u4eae\u70b9\u8bb2\u6e05\u695a<\/li>\n\n\n\n<li><strong>\u4ee3\u7801\u624b\u5199\u80fd\u529b<\/strong>\uff1a\u767d\u677f \/ \u5728\u7ebf\u7f16\u8f91\u5668\u90fd\u53ef\u80fd\u624b\u5199<\/li>\n\n\n\n<li><strong>\u6c9f\u901a\u80fd\u529b<\/strong>\uff1a\u9762\u8bd5\u5b98\u5173\u6ce8\u534f\u4f5c\u548c\u601d\u8def\uff0c\u4e0d\u53ea\u662f\u5199\u4ee3\u7801<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u4e00\u53e5\u8bdd\u603b\u7ed3<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\u524d\u7aef\u9762\u8bd5 = HTML\/CSS + JS + \u6846\u67b6 + \u7f51\u7edc + \u5de5\u7a0b\u5316 + \u9879\u76ee\u7ecf\u9a8c + \u7b97\u6cd5<\/strong><br><strong>\u91cd\u70b9\u662f\u7406\u89e3\u539f\u7406 + \u5b9e\u6218\u7ecf\u9a8c + \u601d\u8def\u8868\u8fbe<\/strong><\/p>\n<\/blockquote>\n\n\n\n<p>\u597d\u7684\uff0c\u6211\u5e2e\u4f60\u6574\u7406\u4e00\u4efd <strong>\u524d\u7aef\u9762\u8bd5\u5168\u5957\u9898\u5e93 + \u89e3\u6790 + \u4ee3\u7801\u793a\u4f8b<\/strong>\uff0c\u7ed3\u6784\u6e05\u6670\uff0c\u8986\u76d6 <strong>\u57fa\u7840\u77e5\u8bc6\u3001JavaScript\u3001\u6846\u67b6\u3001\u5de5\u7a0b\u5316\u3001\u7f51\u7edc\u3001\u6027\u80fd\u3001\u7b97\u6cd5\u3001\u9879\u76ee\u7ecf\u9a8c<\/strong>\uff0c\u65b9\u4fbf\u4f60\u5237\u9898\u548c\u590d\u4e60\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u524d\u7aef\u9762\u8bd5\u5168\u5957\u9898\u5e93\uff08\u542b\u89e3\u6790 + \u4ee3\u7801\u793a\u4f8b\uff09<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001HTML \/ CSS<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. HTML \u8bed\u4e49\u5316\u6807\u7b7e<\/h3>\n\n\n\n<p><strong>\u9898\u76ee<\/strong>\uff1a\u8bf7\u5217\u4e3e\u5e38\u7528\u7684\u8bed\u4e49\u5316\u6807\u7b7e\uff0c\u5e76\u8bf4\u660e\u7528\u9014\u3002<br><strong>\u7b54\u6848\u793a\u4f8b<\/strong>\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6807\u7b7e<\/th><th>\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td><code>&lt;header&gt;<\/code><\/td><td>\u9875\u9762\u5934\u90e8<\/td><\/tr><tr><td><code>&lt;footer&gt;<\/code><\/td><td>\u9875\u9762\u5e95\u90e8<\/td><\/tr><tr><td><code>&lt;main&gt;<\/code><\/td><td>\u4e3b\u5185\u5bb9\u533a\u57df<\/td><\/tr><tr><td><code>&lt;article&gt;<\/code><\/td><td>\u72ec\u7acb\u6587\u7ae0\u6216\u6a21\u5757<\/td><\/tr><tr><td><code>&lt;section&gt;<\/code><\/td><td>\u4e3b\u9898\u5206\u533a<\/td><\/tr><tr><td><code>&lt;nav&gt;<\/code><\/td><td>\u5bfc\u822a\u83dc\u5355<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u89e3\u6790<\/strong>\uff1a\u8bed\u4e49\u5316\u6709\u52a9\u4e8e SEO\u3001\u5c4f\u5e55\u9605\u8bfb\u5668\u8f85\u52a9\u4ee5\u53ca\u4ee3\u7801\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. CSS \u6c34\u5e73\u5782\u76f4\u5c45\u4e2d<\/h3>\n\n\n\n<p><strong>\u9898\u76ee<\/strong>\uff1a\u5b9e\u73b0\u4e00\u4e2a div \u5c45\u4e2d\u5bb9\u5668\uff08\u6c34\u5e73 + \u5782\u76f4\uff09<br><strong>\u89e3\u6cd5\u4e00\uff1aFlex<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n.parent {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n<\/pre><\/div>\n\n\n<p><strong>\u89e3\u6cd5\u4e8c\uff1aGrid<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n.parent {\n  display: grid;\n  place-items: center;\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u76d2\u6a21\u578b<\/h3>\n\n\n\n<p><strong>\u9898\u76ee<\/strong>\uff1a<code>content-box<\/code> \u4e0e <code>border-box<\/code> \u6709\u4f55\u533a\u522b\uff1f<br><strong>\u7b54\u6848<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>content-box<\/code>\uff1awidth\/height \u53ea\u8ba1\u7b97\u5185\u5bb9\uff0c\u4e0d\u7b97 padding \u548c border<\/li>\n\n\n\n<li><code>border-box<\/code>\uff1awidth\/height \u5305\u542b padding + border\uff0c\u66f4\u76f4\u89c2<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n* { box-sizing: border-box; }\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001JavaScript<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Object.keys \u7528\u6cd5<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst obj = { a: 1, b: 2 };\nconsole.log(Object.keys(obj)); \/\/ &#x5B;&quot;a&quot;, &quot;b&quot;]\n\n<\/pre><\/div>\n\n\n<p><strong>\u7528\u9014<\/strong>\uff1a\u83b7\u53d6\u5bf9\u8c61\u81ea\u8eab\u53ef\u679a\u4e3e\u5c5e\u6027\u540d\u6570\u7ec4\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u9632\u6296\u4e0e\u8282\u6d41<\/h3>\n\n\n\n<p><strong>\u9632\u6296<\/strong>\uff08Debounce\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction debounce(fn, delay) {\n  let timer;\n  return function(...args) {\n    clearTimeout(timer);\n    timer = setTimeout(() =&gt; fn.apply(this, args), delay);\n  }\n}\n\n<\/pre><\/div>\n\n\n<p><strong>\u8282\u6d41<\/strong>\uff08Throttle\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction throttle(fn, interval) {\n  let last = 0;\n  return function(...args) {\n    const now = Date.now();\n    if (now - last &gt; interval) {\n      fn.apply(this, args);\n      last = now;\n    }\n  }\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u95ed\u5305<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction counter() {\n  let count = 0;\n  return function() {\n    count++;\n    return count;\n  }\n}\nconst c = counter();\nconsole.log(c()); \/\/ 1\nconsole.log(c()); \/\/ 2\n\n<\/pre><\/div>\n\n\n<p><strong>\u7528\u9014<\/strong>\uff1a\u5b9e\u73b0\u79c1\u6709\u53d8\u91cf\u3001\u6570\u636e\u5c01\u88c5\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u5f02\u6b65\u673a\u5236<\/h3>\n\n\n\n<p><strong>Event Loop \/ \u5b8f\u4efb\u52a1\u4e0e\u5fae\u4efb\u52a1<\/strong>\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconsole.log(1);\nsetTimeout(() =&gt; console.log(2), 0);\nPromise.resolve().then(() =&gt; console.log(3));\nconsole.log(4);\n\n<\/pre><\/div>\n\n\n<p><strong>\u8f93\u51fa\u987a\u5e8f<\/strong>\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n1 4 3 2\n\n<\/pre><\/div>\n\n\n<p><strong>\u89e3\u6790<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u540c\u6b65\u6267\u884c \u2192 1, 4<\/li>\n\n\n\n<li>\u5fae\u4efb\u52a1\uff08Promise.then\uff09 \u2192 3<\/li>\n\n\n\n<li>\u5b8f\u4efb\u52a1\uff08setTimeout\uff09 \u2192 2<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u6846\u67b6<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. React \u57fa\u7840<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction App() {\n  const &#x5B;count, setCount] = React.useState(0);\n  return &amp;lt;button onClick={() =&gt; setCount(count + 1)}&gt;{count}&amp;lt;\/button&gt;\n}\n\n<\/pre><\/div>\n\n\n<p><strong>Hooks<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>useState\uff1a\u72b6\u6001<\/li>\n\n\n\n<li>useEffect\uff1a\u526f\u4f5c\u7528<\/li>\n\n\n\n<li>useMemo \/ useCallback\uff1a\u6027\u80fd\u4f18\u5316<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Vue \u54cd\u5e94\u5f0f<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst state = Vue.reactive({ count: 0 });\nVue.watch(() =&gt; state.count, (newVal) =&gt; {\n  console.log(newVal);\n});\n\n<\/pre><\/div>\n\n\n<p><strong>\u89e3\u6790<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Vue3 \u4f7f\u7528 Proxy \u5b9e\u73b0\u54cd\u5e94\u5f0f<\/li>\n\n\n\n<li>Vue2 \u4f7f\u7528 defineProperty<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u524d\u7aef\u5de5\u7a0b\u5316<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. npm \u5e38\u7528\u547d\u4ee4<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnpm install express\nnpm install -g typescript\nnpm uninstall \u5305\u540d\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. Webpack \/ Vite<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Loader\uff1a\u5904\u7406\u6587\u4ef6\u7c7b\u578b\uff08babel-loader\uff09<\/li>\n\n\n\n<li>Plugin\uff1a\u6269\u5c55\u529f\u80fd\uff08HtmlWebpackPlugin\uff09<\/li>\n\n\n\n<li>Tree shaking\uff1a\u6d88\u9664\u65e0\u7528\u4ee3\u7801<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u7f51\u7edc\u4e0e\u6027\u80fd<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. HTTP \u72b6\u6001\u7801<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u72b6\u6001\u7801<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td>200<\/td><td>\u8bf7\u6c42\u6210\u529f<\/td><\/tr><tr><td>301<\/td><td>\u6c38\u4e45\u91cd\u5b9a\u5411<\/td><\/tr><tr><td>302<\/td><td>\u4e34\u65f6\u91cd\u5b9a\u5411<\/td><\/tr><tr><td>404<\/td><td>\u9875\u9762\u4e0d\u5b58\u5728<\/td><\/tr><tr><td>500<\/td><td>\u670d\u52a1\u5668\u9519\u8bef<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u6d4f\u89c8\u5668\u7f13\u5b58<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5f3a\u5236\u7f13\u5b58\uff1a<code>Cache-Control: max-age=xxx<\/code><\/li>\n\n\n\n<li>\u534f\u5546\u7f13\u5b58\uff1a<code>Last-Modified<\/code> \/ <code>ETag<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u524d\u7aef\u6027\u80fd\u4f18\u5316<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u56fe\u7247\u538b\u7f29 \/ CDN<\/li>\n\n\n\n<li>\u4ee3\u7801\u5206\u5272 \/ \u61d2\u52a0\u8f7d<\/li>\n\n\n\n<li>\u51cf\u5c11\u91cd\u6392\u91cd\u7ed8<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u6570\u7ec4\u53bb\u91cd<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst arr = &#x5B;1,1,2,2,3];\nconst unique = &#x5B;...new Set(arr)];\nconsole.log(unique); \/\/ &#x5B;1,2,3]\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. \u5b9e\u73b0 map<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nArray.prototype.myMap = function(fn) {\n  const result = &#x5B;];\n  for(let i=0; i&amp;lt;this.length; i++){\n    result.push(fn(this&#x5B;i], i, this));\n  }\n  return result;\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u9879\u76ee\u7ecf\u9a8c\u9762\u8bd5\u9898<\/h2>\n\n\n\n<p><strong>\u793a\u4f8b\u9898\u76ee<\/strong>\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f60\u5728\u9879\u76ee\u4e2d\u5982\u4f55\u5904\u7406\u8de8\u57df\uff1f<\/li>\n\n\n\n<li>\u9875\u9762\u6027\u80fd\u4f18\u5316\u505a\u8fc7\u54ea\u4e9b\uff1f<\/li>\n\n\n\n<li>\u4f60\u9047\u5230\u8fc7\u6700\u96be\u7684 bug \u662f\u4ec0\u4e48\uff1f\u5982\u4f55\u89e3\u51b3\uff1f<\/li>\n\n\n\n<li>\u524d\u7aef\u4e0e\u540e\u7aef\u5982\u4f55\u534f\u4f5c\uff1f<\/li>\n<\/ol>\n\n\n\n<p><strong>\u89e3\u6790<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9879\u76ee\u7ecf\u9a8c\u6700\u597d\u7528 <strong>STAR \u65b9\u6cd5<\/strong>\uff08Situation, Task, Action, Result\uff09<\/li>\n\n\n\n<li>\u7528\u91cf\u5316\u6570\u636e\u8bf4\u660e\u4f18\u5316\u6548\u679c\u66f4\u52a0\u5206<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u516b\u3001\u9762\u8bd5\u6280\u5de7\u603b\u7ed3<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7406\u89e3\u539f\u7406\u6bd4\u80cc\u8bed\u6cd5\u91cd\u8981<\/strong><\/li>\n\n\n\n<li><strong>\u80fd\u624b\u5199\u4ee3\u7801\u548c\u753b\u6d41\u7a0b\u56fe<\/strong><\/li>\n\n\n\n<li><strong>\u5c55\u793a\u9879\u76ee\u7ecf\u9a8c<\/strong><\/li>\n\n\n\n<li><strong>\u5584\u4e8e\u62c6\u89e3\u95ee\u9898<\/strong><\/li>\n\n\n\n<li><strong>\u6c9f\u901a\u80fd\u529b\u4e5f\u5f88\u91cd\u8981<\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u8bf4\u7684 \u201c\u524d\u7aef\u9762\u8bd5\u201d \u53ef\u4ee5\u5206\u4e3a\u51e0\u4e2a\u65b9\u5411\uff1a\u57fa\u7840\u77e5\u8bc6\u3001\u5b9e\u6218\u6280\u80fd\u3001\u6846\u67b6\u5e93\u3001\u9879\u76ee\u7ecf\u9a8c\u4ee5\u53ca&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/31\/%e5%89%8d%e7%ab%af%e9%9d%a2%e8%af%95\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1093","post","type-post","status-publish","format-standard","hentry","category-12"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=1093"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1093\/revisions"}],"predecessor-version":[{"id":1094,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1093\/revisions\/1094"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=1093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=1093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=1093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}