{"id":21439,"date":"2024-11-19T16:31:42","date_gmt":"2024-11-19T08:31:42","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21439\/"},"modified":"2024-11-19T16:31:42","modified_gmt":"2024-11-19T08:31:42","slug":"vscode%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8chtml%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21439\/","title":{"rendered":"vscode\u600e\u4e48\u8fd0\u884chtml\u9879\u76ee"},"content":{"rendered":"<blockquote><p>\n  \u5728 visual studio code \u4e2d\u8fd0\u884c html \u9879\u76ee\uff1a\u5b89\u88c5 live server \u6269\u5c55\u3002\u521b\u5efa html \u6587\u4ef6\uff08index.html\uff09\u3002\u4f7f\u7528 live server \u8fd0\u884c\u9879\u76ee\uff08\u53f3\u952e\u5355\u51fb index.html -&gt; open with live server\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/29\/2024052913121696146.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u8fd0\u884chtml\u9879\u76ee\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u8fd0\u884chtml\u9879\u76ee\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8fd0\u884c HTML \u9879\u76ee<\/strong><\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5 Live Server \u6269\u5c55<\/p>\n<ul>\n<li>\u6253\u5f00 Visual Studio Code\uff0c\u7136\u540e\u8f6c\u5230\u6269\u5c55\u9762\u677f (Ctrl\/Cmd + Shift + X)\u3002<\/li>\n<li>\u641c\u7d22 &#8220;Live Server&#8221; \u5e76\u5b89\u88c5\u8be5\u6269\u5c55\u3002<\/li>\n<\/ul>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa HTML \u6587\u4ef6<\/p>\n<ul>\n<li>\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u547d\u540d\u4e3a &#8220;index.html&#8221;\u3002<\/li>\n<li>\u5728\u8be5\u6587\u4ef6\u4e2d\u8f93\u5165\u4f60\u7684 HTML \u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p>\u7b2c\u4e09\u6b65\uff1a\u4f7f\u7528 Live Server \u8fd0\u884c\u9879\u76ee<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u5728 Visual Studio Code \u4e2d\uff0c\u53f3\u952e\u5355\u51fb &#8220;index.html&#8221; \u6587\u4ef6\u5e76\u9009\u62e9 &#8220;Open with Live Server&#8221;\u3002<\/li>\n<li>\u6269\u5c55\u7a0b\u5e8f\u5c06\u542f\u52a8\u4e00\u4e2a\u5b9e\u65f6\u670d\u52a1\u5668\uff0c\u5e76\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u4f60\u7684\u9879\u76ee\u3002<\/li>\n<\/ul>\n<p><strong>\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 Live Server \u6269\u5c55\uff1a<\/strong>\u8f6c\u5230 Visual Studio Code \u7684\u6269\u5c55\u9762\u677f\uff0c\u641c\u7d22 &#8220;Live Server&#8221; \u5e76\u5b89\u88c5\u5b83\u3002<\/li>\n<li> <strong>\u521b\u5efa HTML \u6587\u4ef6\uff1a<\/strong>\u5728\u4f60\u7684\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u521b\u5efa &#8220;index.html&#8221; \u6587\u4ef6\uff0c\u5e76\u8f93\u5165\u4f60\u7684 HTML \u4ee3\u7801\u3002<\/li>\n<li> <strong>\u4f7f\u7528 Live Server \u8fd0\u884c\u9879\u76ee\uff1a<\/strong>\u53f3\u952e\u5355\u51fb &#8220;index.html&#8221; \u6587\u4ef6\uff0c\u9009\u62e9 &#8220;Open with Live Server&#8221;\u3002<\/li>\n<li> <strong>\u67e5\u770b\u9879\u76ee\uff1a<\/strong>\u4f60\u7684\u9879\u76ee\u5c06\u5728\u6d4f\u89c8\u5668\u4e2d\u81ea\u52a8\u6253\u5f00\uff0c\u5e76\u663e\u793a\u5728\u5b9e\u65f6\u670d\u52a1\u5668\u4e2d\u3002<\/li>\n<li> <strong>\u4fdd\u5b58\u66f4\u6539\uff1a<\/strong>\u6bcf\u5f53\u4f60\u4fdd\u5b58 &#8220;index.html&#8221; \u6587\u4ef6\u7684\u66f4\u6539\u65f6\uff0c\u6d4f\u89c8\u5668\u4e2d\u7684\u9879\u76ee\u4e5f\u4f1a\u76f8\u5e94\u66f4\u65b0\u3002<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8fd0\u884chtml\u9879\u76ee\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>\u5728 visual studio code \u4e2d\u8fd0\u884c html \u9879\u76ee\uff1a\u5b89\u88c5 live server \u6269\u5c55\u3002\u521b\u5efa html \u6587\u4ef6\uff08index.html\uff09\u3002\u4f7f\u7528 live server \u8fd0\u884c\u9879\u76ee\uff08\u53f3\u952e\u5355\u51fb index.html -&gt; open with live server\uff09\u3002 \u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8fd0\u884c HTML \u9879\u76ee \u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5 Live Server \u6269\u5c55 \u6253\u5f00 Visual Studio Code\uff0c\u7136\u540e\u8f6c\u5230\u6269\u5c55\u9762\u677f (Ctrl\/Cmd + Shift + X)\u3002 \u641c\u7d22 &#8220;Live Server&#8221; \u5e76\u5b89\u88c5\u8be5\u6269\u5c55\u3002 \u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa HTML \u6587\u4ef6 \u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u547d\u540d\u4e3a &#8220;index.html&#8221;\u3002 \u5728\u8be5\u6587\u4ef6\u4e2d\u8f93\u5165\u4f60\u7684 HTML \u4ee3\u7801\u3002 \u7b2c\u4e09\u6b65\uff1a\u4f7f\u7528 Live [&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-21439","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21439","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=21439"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21439\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}