{"id":21370,"date":"2024-11-19T14:47:49","date_gmt":"2024-11-19T06:47:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21370\/"},"modified":"2024-11-19T14:47:49","modified_gmt":"2024-11-19T06:47:49","slug":"vscode%e5%86%99html%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21370\/","title":{"rendered":"vscode\u5199html\u600e\u4e48\u8fd0\u884c"},"content":{"rendered":"<blockquote><p>\n  \u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5728 visual studio code \u4e2d\u8fd0\u884c html \u4ee3\u7801\uff0c\u5176\u4e2d\u5305\u62ec\uff1a\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\uff1a\u4f7f\u7528 &#8220;\u8fd0\u884c&#8221; \u6309\u94ae\uff08ctrl + f5\uff09\u4f7f\u7528 live server \u6269\u5c55\uff1a\u5b89\u88c5\u6269\u5c55\u5e76\u9009\u62e9 &#8220;live server: start&#8221;\u4f7f\u7528\u547d\u4ee4\u884c\uff1a\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c &#8220;python -m http.server 8000&#8221;\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/27\/2024052712391994440.jpg\" class=\"aligncenter\" title=\"vscode\u5199html\u600e\u4e48\u8fd0\u884c\u63d2\u56fe\" alt=\"vscode\u5199html\u600e\u4e48\u8fd0\u884c\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8fd0\u884c HTML \u4ee3\u7801<\/strong><\/p>\n<p><strong>\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c<\/strong><\/p>\n<p>\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u662f\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c HTML \u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u6253\u5f00 Visual Studio Code\uff0c\u5e76\u6253\u5f00\u8981\u8fd0\u884c\u7684 HTML \u6587\u4ef6\u3002<\/li>\n<li>\u70b9\u51fb\u9875\u9762\u5de6\u4e0b\u89d2\u7684\u201c\u8fd0\u884c\u201d\u6309\u94ae\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e Ctrl + F5\u3002<\/li>\n<li>\u4ee3\u7801\u5c06\u5728\u9ed8\u8ba4\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u3002<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528 Live Server \u6269\u5c55<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>Live Server \u6269\u5c55\u53ef\u4ee5\u5b9e\u65f6\u9884\u89c8 HTML \u4ee3\u7801\u7684\u66f4\u6539\uff1a<\/p>\n<ul>\n<li>\u5b89\u88c5 Live Server \u6269\u5c55\u3002<\/li>\n<li>\u5728 HTML \u6587\u4ef6\u4e0a\u70b9\u51fb\u53f3\u952e\uff0c\u9009\u62e9\u201cLive Server: Start\u201d\u3002<\/li>\n<li>\u4ee3\u7801\u5c06\u5728\u9ed8\u8ba4\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\uff0c\u5e76\u5728\u66f4\u6539\u65f6\u81ea\u52a8\u5237\u65b0\u3002<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528\u547d\u4ee4\u884c<\/strong><\/p>\n<p>\u4e5f\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u6765\u8fd0\u884c HTML \u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/li>\n<li>\u5bfc\u822a\u5230 HTML \u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002<\/li>\n<li>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre>python -m http.server 8000<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00 localhost:8000\uff0c\u5373\u53ef\u9884\u89c8\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u65b9\u6cd5<\/strong><\/p>\n<p>\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u8fd0\u884c HTML \u4ee3\u7801\uff1a<\/p>\n<ul>\n<li> <strong>\u4f7f\u7528 Web \u670d\u52a1\u5668\uff1a<\/strong>\u4f8b\u5982 Apache \u6216 Nginx\uff0c\u914d\u7f6e\u670d\u52a1\u5668\u4ee5\u63d0\u4f9b HTML \u6587\u4ef6\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u670d\u52a1\u5de5\u5177\uff1a<\/strong>\u4f8b\u5982 Node.js \u6216 Python\uff0c\u4f7f\u7528\u670d\u52a1\u5de5\u5177\u542f\u52a8\u670d\u52a1\u5668\u5e76\u6258\u7ba1 HTML \u6587\u4ef6\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u5728\u7ebf\u5de5\u5177\uff1a<\/strong>\u5982 JSFiddle \u6216 CodePen\uff0c\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5728\u7ebf\u73af\u5883\u6765\u8fd0\u884c HTML \u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5199html\u600e\u4e48\u8fd0\u884c\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>\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5728 visual studio code \u4e2d\u8fd0\u884c html \u4ee3\u7801\uff0c\u5176\u4e2d\u5305\u62ec\uff1a\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\uff1a\u4f7f\u7528 &#8220;\u8fd0\u884c&#8221; \u6309\u94ae\uff08ctrl + f5\uff09\u4f7f\u7528 live server \u6269\u5c55\uff1a\u5b89\u88c5\u6269\u5c55\u5e76\u9009\u62e9 &#8220;live server: start&#8221;\u4f7f\u7528\u547d\u4ee4\u884c\uff1a\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c &#8220;python -m http.server 8000&#8221; \u5982\u4f55\u5728 Visual Studio Code \u4e2d\u8fd0\u884c HTML \u4ee3\u7801 \u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c \u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u662f\u5728\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c HTML \u4ee3\u7801\uff1a \u6253\u5f00 Visual Studio Code\uff0c\u5e76\u6253\u5f00\u8981\u8fd0\u884c\u7684 HTML \u6587\u4ef6\u3002 \u70b9\u51fb\u9875\u9762\u5de6\u4e0b\u89d2\u7684\u201c\u8fd0\u884c\u201d\u6309\u94ae\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e Ctrl + F5\u3002 \u4ee3\u7801\u5c06\u5728\u9ed8\u8ba4\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u3002 \u4f7f\u7528 Live Server \u6269\u5c55 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b Live Server \u6269\u5c55\u53ef\u4ee5\u5b9e\u65f6\u9884\u89c8 HTML \u4ee3\u7801\u7684\u66f4\u6539\uff1a \u5b89\u88c5 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-21370","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21370","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=21370"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21370\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}