{"id":464,"date":"2025-04-03T06:00:18","date_gmt":"2025-04-02T22:00:18","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/"},"modified":"2025-04-03T06:00:18","modified_gmt":"2025-04-02T22:00:18","slug":"%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/","title":{"rendered":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views\" id=\"content_views\">\n<h2 id=\"main-toc\">\n   <strong><br \/>\n    \u76ee\u5f55<br \/>\n   <\/strong><br \/>\n  <\/h2>\n<p id=\"1%E3%80%81%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%80%9D%E8%B7%AF-toc\" style=\"margin-left:0px;\">\n   <a href=\"#1%E3%80%81%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%80%9D%E8%B7%AF\" rel=\"nofollow\"><br \/>\n    1\u3001\u6e38\u620f\u8bbe\u8ba1\u601d\u8def<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2%E3%80%81%E9%A3%9E%E6%9C%BA%E8%AE%BE%E8%AE%A1%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%AD%A5%E9%AA%A4-toc\" style=\"margin-left:0px;\">\n   <a href=\"#2%E3%80%81%E9%A3%9E%E6%9C%BA%E8%AE%BE%E8%AE%A1%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%AD%A5%E9%AA%A4\" rel=\"nofollow\"><br \/>\n    2\u3001\u98de\u673a\u5c04\u51fb\u6e38\u620f\u8bbe\u8ba1\u6b65\u9aa4<br \/>\n   <\/a>\n  <\/p>\n<hr id=\"hr-toc\"\/>\n<p style=\"text-indent:33px;\">\n   \u672c\u7bc7\u535a\u6587\u5c06\u5206\u4eab\u4e00\u7bc7\u57fa\u4e8eHTML\u7684\u7b80\u5355\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\uff0c\u4e0b\u65b9\u662f\u73a9\u5bb6\u98de\u673a\uff0c\u53ef\u6309\u7a7a\u683c\u952e\u80fd\u4e0d\u65ad\u5730\u53d1\u5c04\u5b50\u5f39\uff0c\u4e0a\u65b9\u662f\u968f\u673a\u51fa\u73b0\u7684\u654c\u65b9\u98de\u673a\u3002\u73a9\u5bb6\u53ef\u4ee5\u901a\u8fc7\u952e\u76d8\u7684\u65b9\u5411\u952e\u63a7\u5236\u81ea\u5df1\u98de\u673a\u7684\u79fb\u52a8\uff0c\u5f53\u73a9\u5bb6\u98de\u673a\u7684\u5b50\u5f39\u78b0\u5230\u654c\u65b9\u98de\u673a\u65f6\uff0c\u654c\u65b9\u98de\u673a\u51fa\u73b0\u7206\u70b8\u6548\u679c\u3002\u6e38\u620f\u8fd0\u884c\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a\n  <\/p>\n<p style=\"text-align:center;\">\n<h2 id=\"1%E3%80%81%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%80%9D%E8%B7%AF\">\n   <strong><br \/>\n    1\u3001\u6e38\u620f\u8bbe\u8ba1\u601d\u8def<br \/>\n   <\/strong><br \/>\n  <\/h2>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    1\u3001\u6e38\u620f\u7d20\u6750<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u6e38\u620f\u7a0b\u5e8f\u4e2d\u7528\u5230\u654c\u65b9\u98de\u673a\u3001\u6211\u65b9\u98de\u673a\u3001\u5b50\u5f39\u3001\u654c\u673a\u88ab\u51fb\u4e2d\u7684\u7206\u70b8\u56fe\u7247\u7b49\uff0c\u5206\u522b\u4f7f\u7528\u5982\u4e0b\u56fe\u6240\u793a\uff1a\n  <\/p>\n<p style=\"text-align:center;\">\n<p style=\"text-align:center;\">\n<p style=\"text-align:center;\">\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    2\u3001\u5730\u56fe\u6eda\u52a8\u7684\u539f\u7406\u5b9e\u73b0<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u4e3e\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5927\u5bb6\u90fd\u5750\u8fc7\u706b\u8f66\u5427\uff0c\u5750\u706b\u8f66\u7684\u65f6\u5019\u90fd\u9047\u5230\u8fc7\u81ea\u5df1\u7684\u706b\u8f66\u660e\u660e\u662f\u505c\u6b62\u7684\uff0c\u4f46\u662f\u65c1\u8fb9\u94c1\u8f68\u7684\u706b\u8f66\u5728\u5411\u540e\u884c\u9a76\uff0c\u4f1a\u6709\u4e00\u79cd\u9519\u89c9\u611f\u89c9\u81ea\u5df1\u7684\u706b\u8f66\u662f\u5728\u5411\u524d\u884c\u9a76\u3002\u98de\u884c\u5c04\u51fb\u7c7b\u6e38\u620f\u7684\u5730\u56fe\u539f\u7406\u548c\u8fd9\u4e2a\u5b8c\u5168\u4e00\u6837\u3002\u73a9\u5bb6\u5728\u63a7\u5236\u98de\u673a\u5728\u5c4f\u5e55\u4e2d\u98de\u884c\u7684\u4f4d\u7f6e\uff0c\u80cc\u666f\u56fe\u7247\u4e00\u76f4\u5411\u540e\u6eda\u52a8\u4ece\u800c\u7ed9\u73a9\u5bb6\u4e00\u79cd\u9519\u89c9\u81ea\u5df1\u63a7\u5236\u7684\u98de\u673a\u5728\u5411\u524d\u98de\u884c\u3002\n  <\/p>\n<p style=\"text-align:center;\">\n<p style=\"text-indent:33px;\">\n   \u5982\u4e0b\u56fe\u6240\u793a\u5730\u56fe\u56fe\u7247\u5728\u5c4f\u5e55\u80cc\u540e\u4ea4\u66ff\u6eda\u52a8\uff0c\u8fd9\u6837\u5c31\u4f1a\u7ed9\u73a9\u5bb6\u4ea7\u751f\u81ea\u5df1\u63a7\u5236\u7684\u98de\u673a\u5728\u5411\u524d\u79fb\u52a8\u7684\u9519\u89c9\u3002\n  <\/p>\n<p style=\"text-align:center;\">\n<p style=\"text-indent:33px;\">\n   \u5730\u56fe\u6eda\u52a8\u7684\u76f8\u5173\u4ee3\u7801\uff0c\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">function updateBg() {\n        \/** \u66f4\u65b0\u6e38\u620f\u80cc\u666f\u56fe\u7247\u5b9e\u73b0\u5411\u4e0b\u6eda\u52a8\u6548\u679c**\/\n        mBitposY0 += 5;\/\/\u7b2c\u4e00\u5f20\u5730\u56femap_0.png\u7684\u7eb5\u5750\u6807\u4e0b\u79fb5\u4e2a\u50cf\u7d20\n        mBitposY1 += 5;\/\/\u7b2c\u4e8c\u5f20\u5730\u56femap_1.png\u7684\u7eb5\u5750\u6807\u4e0b\u79fb5\u4e2a\u50cf\u7d20\n        if (mBitposY0 == mScreenHeight) { \/\/\u8d85\u8fc7\u6e38\u620f\u5c4f\u5e55\u7684\u5e95\u8fb9\n            mBitposY0 = -mScreenHeight;\/\/\u56de\u5230\u5c4f\u5e55\u4e0a\u65b9\n        }\n        if (mBitposY1 == mScreenHeight) {\/\/\u8d85\u8fc7\u6e38\u620f\u5c4f\u5e55\u7684\u5e95\u8fb9\n            mBitposY1 = -mScreenHeight; \/\/\u56de\u5230\u5c4f\u5e55\u4e0a\u65b9\n        }\n    }<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    3\u3001\u98de\u673a\u548c\u5b50\u5f39\u7684\u5b9e\u73b0<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u6e38\u620f\u4e2d\u4f7f\u7528\u5230\u7684\u98de\u673a\u3001\u5b50\u5f39\u5747\u91c7\u7528\u5bf9\u5e94\u7684\u7c7b\u5b9e\u73b0\u3002\u56e0\u4e3a\u5b50\u5f39\u7684\u6570\u91cf\u4f1a\u6709\u5f88\u591a\uff0c\u654c\u673a\u7684\u6570\u91cf\u4e5f\u4f1a\u5f88\u591a\uff0c\u6240\u4ee5\u6bcf\u4e00\u9897\u5b50\u5f39\u987b\u8981\u7528\u4e00\u4e2a\u5bf9\u8c61\u6765\u8bb0\u5f55\u8fd9\u5f53\u524d\u5b50\u5f39\u5728\u5c4f\u5e55\u4e2d\u7684X\uff0cY\u5750\u6807\u3002\u6bcf\u4e00\u67b6\u654c\u673a\u4e5f\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u4e5f\u8bb0\u5f55\u7740\u5b83\u5728\u5c4f\u5e55\u4e2d\u7684X,Y\u5750\u6807\u3002\u8fd9\u6837\u5728\u5904\u7406\u78b0\u649e\u7684\u65f6\u5019\u901a\u8fc7\u904d\u5386\u5b50\u5f39\u5bf9\u8c61\u4e0e\u654c\u673a\u5bf9\u8c61\u5c31\u53ef\u4ee5\u8ba1\u7b97\u51fa\u78b0\u649e\u7684\u7ed3\u679c\uff0c\u4ece\u800c\u62ff\u5230\u78b0\u649e\u7684\u654c\u673a\u5bf9\u8c61\u64ad\u653e\u6b7b\u4ea1\u7206\u70b8\u52a8\u753b\u3002\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u6e38\u620f\u8fc7\u7a0b\u4e2d\u6bcf\u96943\u79d2\u6dfb\u52a0\u4e00\u67b6\u654c\u673a\uff0c\u73a9\u5bb6\u6309\u7a7a\u683c\u952e\u53d1\u5c04\u5b50\u5f39\u5e76\u521d\u59cb\u5316\u5176\u4f4d\u7f6e\u5750\u6807\u5728\u73a9\u5bb6\u98de\u673a\u524d\u65b9\u3002\u5728\u5b9a\u65f6\u4e8b\u4ef6\u4e2d\u4e0d\u65ad\u66f4\u65b0\u6e38\u620f\u80cc\u666f\u56fe\u7247\u4f4d\u7f6e\uff0c\u4e0b\u79fb5\u4e2a\u50cf\u7d20\uff0c\u5b9e\u73b0\u5411\u4e0b\u6eda\u52a8\u6548\u679c\uff0c\u540c\u65f6\u66f4\u65b0\u6bcf\u53d1\u5b50\u5f39\u4f4d\u7f6e\u6bcf\u6b21\u4e0a\u79fb1\u4e2a\u50cf\u7d20\uff0c\u66f4\u65b0\u654c\u673a\u4f4d\u7f6e\uff08\u6bcf\u6b211\u4e2a\u50cf\u7d20\uff09\uff0c\u6700\u540e\u68c0\u6d4b\u5b50\u5f39\u4e0e\u654c\u673a\u7684\u78b0\u649e\u3002\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u8fd9\u6837\u5728\u5904\u7406\u78b0\u649e\u7684\u65f6\u5019\u5176\u5b9e\u5c31\u662f\u6bcf\u4e00\u9897\u5b50\u5f39\u7684\u77e9\u5f62\u533a\u57df\u4e0e\u6bcf\u4e00\u67b6\u654c\u673a\u7684\u77e9\u5f62\u533a\u57df\u7684\u78b0\u649e\u3002\u901a\u8fc7\u904d\u5386\u5b50\u5f39\u5bf9\u8c61\u4e0e\u654c\u673a\u5bf9\u8c61\u5c31\u53ef\u4ee5\u8ba1\u7b97\u51fa\u78b0\u649e\u7684\u7ed3\u679c\uff0c\u4ece\u800c\u5f97\u5230\u78b0\u649e\u7684\u654c\u673a\u5bf9\u8c61\u5e76\u64ad\u653e\u6b7b\u4ea1\u7206\u70b8\u52a8\u753b\u3002\n  <\/p>\n<h2 id=\"2%E3%80%81%E9%A3%9E%E6%9C%BA%E8%AE%BE%E8%AE%A1%E6%B8%B8%E6%88%8F%E8%AE%BE%E8%AE%A1%E6%AD%A5%E9%AA%A4\">\n   <strong><br \/>\n    2\u3001\u98de\u673a\u5c04\u51fb\u6e38\u620f\u8bbe\u8ba1\u6b65\u9aa4<br \/>\n   <\/strong><br \/>\n  <\/h2>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    1\u3001\u8bbe\u8ba1\u5b50\u5f39\u7c7b<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u521b\u5efa\u4e00\u4e2a\u7684Bullet\u7c7b\uff0c\u7528\u4e8e\u8868\u793a\u5b50\u5f39\uff0c\u5b9e\u73b0\u5b50\u5f39\u5750\u6807\u66f4\u65b0\uff0c\u7ed8\u5236\u5b50\u5f39\u52a8\u753b\u6548\u679c\u5e76\u4e0a\u79fb1\u4e2a\u50cf\u7d20\u3002\u5b50\u5f39\u662f\u67094\u5e27\u7ec4\u6210\uff0c\u6bcf10\u4e2a\u65f6\u95f4\u95f4\u9694\uff08\u6bcf\u4e2a\u95f4\u9694\u4e3a1000\/60=16.67\u6beb\u79d2\uff09\u6362\u4e00\u5e27\u3002\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">\/\/\u5b50\u5f39\u7c7b\n    var Bullet = function (image, x, y) {\n        this.image = image;\n        this.x = x;\n        this.y = y;\n        this.width = image.width\/4;\n        this.height = image.height ;\n        this.frm = 0;  \/\/\u5f53\u524d\u662f\u7b2c\u51e0\u5e27\n        this.dis = 0;  \/\/\u591a\u5c11\u65f6\u95f4\u95f4\u9694\n    };\n<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   \u68c0\u6d4b\u70b9(x, y)\u662f\u5426\u5728\u5b50\u5f39\u533a\u57df\u5185\uff08\u672c\u6e38\u620f\u6ca1\u6709\u4f7f\u7528\uff09\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">Bullet.prototype.testPoint = function (x, y) {\n        var betweenX = (x &gt;= this.x) &amp;&amp; (x &lt;= this.x + this.width);\n        var betweenY = (y &gt;= this.y) &amp;&amp; (y &lt;= this.y + this.height);\n        return betweenX &amp;&amp; betweenY;\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   move\u6539\u53d8\u5b50\u5f39\u4f4d\u7f6e\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">Bullet.prototype.move = function (dx, dy) {\n        this.x += dx;\n        this.y += dy;\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   draw\u7ed8\u5236\u5b50\u5f39\u52a8\u753b\u6548\u679c\u5e76\u4e0a\u79fb1\u4e2a\u50cf\u7d20\u3002\u6bcf10\u4e2a\u95f4\u9694\u6362\u4e00\u5e27\uff0c\u5b50\u5f39\u51714\u5e27\uff08\u56fe14-7\u6240\u793a\uff09\u3002\u5b50\u5f39\u5750\u6807\u66f4\u65b0\u4e3b\u8981\u4fee\u6539y\u5750\u6807\uff08\u5782\u76f4\u65b9\u5411\uff09\u503c\uff0c\u6bcf\u6b211\u4e2a\u50cf\u7d20\u3002\u5f53\u7136\u4e5f\u53ef\u4ee5\u4fee\u6539x\u5750\u6807\uff08\u6c34\u5e73\u65b9\u5411\uff09\u503c\uff0c\u8fd9\u91cc\u4e3a\u4e86\u7b80\u5355\u5316\u6ca1\u4fee\u6539x\u5750\u6807\u503c\uff08\u6c34\u5e73\u65b9\u5411\uff09\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">Bullet.prototype.draw = function (ctx) {\n        ctx.save();\n        ctx.translate(this.x, this.y);\n        ctx.drawImage(this.image, this.frm *this.width, 0 , this.width, this.height, \n                                        0, 0, this.width, this.height);\/\/\u7ed8\u5236\u5b50\u5f39\u5bf9\u5e94this.frm\u5e27\n        ctx.restore();\n        this.y--;    \/\/\u4e0a\u79fb1\u4e2a\u50cf\u7d20\n        this.dis++;\n        if (this.dis &gt;= 10) {\/\/10\u4e2a\u95f4\u9694\u6362\u4e00\u5e27\n            this.dis = 0;\n            this.frm++;\n            if (this.frm &gt;= 4) this.frm = 0;\n        }\n    }; <\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   hitTestObject\u5224\u65ad\u5b50\u5f39\u4e0e\u98de\u673a\u662f\u5426\u78b0\u649e\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\"> Bullet.prototype.hitTestObject = function (planobj) {\n        if(isColliding(this.x,this.y,this.width,this.height,\n                planobj.x,planobj.y,planobj.width,planobj.height))\/\/\u53d1\u751f\u78b0\u649e\n            return true;\n        else\n            return false;\n    }<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   isColliding\u5168\u5c40\u51fd\u6570\u662f\u524d\u9762\u5206\u6790\u7684\u7b2c\u4e8c\u79cd\u78b0\u649e\u68c0\u6d4b\u65b9\u6cd5\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">function  isColliding( ax, ay, aw, ah,  bx,  by,  bw,  bh)\n    { \n       if(ay &gt; by + bh || by &gt; ay + ah \n           || ax &gt; bx + bw || bx &gt; ax + aw) \n         return false; \n       else\n         return true; \n    }<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    2\u3001\u8bbe\u8ba1\u98de\u673a\u7c7b<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u5728\u9879\u76ee\u4e2d\u521b\u5efa\u4e00\u4e2aPlan\u7c7b\uff0c\u7528\u4e8e\u8868\u793a\u654c\u673a\u548c\u5df1\u65b9\u7684\u98de\u673a\uff0c\u5b9e\u73b0\u98de\u673a\u5750\u6807\u66f4\u65b0\uff0c\u7ed8\u5236\u529f\u80fd\u3002\u529f\u80fd\u4e0e\u5b50\u5f39\u7c7b\u76f8\u4f3c\u3002\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u6784\u9020\u51fd\u6570\u4e2dimage\u662f\u98de\u673a\u56fe\u7247\uff0c(x, y)\u662f\u98de\u673a\u4f4d\u7f6e\u5750\u6807\uff0c\u800c\u6700\u540e\u4e00\u4e2a\u53c2\u6570n\u662f\u672c\u98de\u673a\u56fe\u662f\u51e0\u5e27\u52a8\u753b\uff0c\u4f8b\u5982\u5df1\u65b9\u98de\u673a\u662f6\u5e27\u52a8\u753b\uff0c\u654c\u673a\u662f2\u5e27\u52a8\u753b\uff0c\u6548\u679c\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<div style=\"text-align:center;\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<p style=\"text-indent:33px;\">\n   \u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">var Plan = function (image, x, y, n) {\n        this.image = image;\n        this.x = x;\n        this.y = y;\n        this.originX = x;\n        this.originY = y;\n        this.width = image.width \/ n;    \/\/\u6bcf\u5e27\u98de\u673a\u5bbd\u5ea6\n        this.height = image.height;    \/\/\u6bcf\u5e27\u98de\u673a\u9ad8\u5ea6\n        this.frm = 0;\n        this.dis = 0;\n        this.n = n;\n    };\n    Plan.prototype.testPoint = function (x, y) {\n        var betweenX = (x &gt;= this.x) &amp;&amp; (x &lt;= this.x + this.width);\n        var betweenY = (y &gt;= this.y) &amp;&amp; (y &lt;= this.y + this.height);\n        return betweenX &amp;&amp; betweenY;\n    };\n    Plan.prototype.move = function (dx, dy) {\n        this.x += dx;\n        this.y += dy;\n    };\n    Plan.prototype.Y = function ( ) {\n        return this.y;\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   draw (ctx)\u4e0d\u65ad\u4e0b\u79fb\u5730\u753b\u98de\u673a\uff0c\u540c\u65f6\u6c34\u5e73\u65b9\u5411\u4e5f\u6709\u4f4d\u79fb\uff0c\u91c7\u7528\u6b63\u5f26\u79fb\u52a8\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">Plan.prototype.draw = function (ctx) {\n        ctx.save();\n        ctx.translate(this.x, this.y);\n        ctx.drawImage(this.image, this.frm *this.width, 0 , this.width, this.height, \n0, 0, this.width, this.height);\n        ctx.restore();\n        this.y++;       \/\/\u4e0b\u79fb1\u4e2a\u50cf\u7d20\n        this.x = this.originX + 20 * Math.sin(Math.PI \/ 100 * this.y);\/\/\u6c34\u5e73\u65b9\u5411\u6b63\u5f26\u79fb\u52a8\n        this.dis++;\n        if (this.dis &gt;= 3) {\/\/3\u4e2a\u95f4\u9694\u6362\u56fe\n            this.dis = 0;\n            this.frm++;\n            if (this.frm &gt;= this.n) this.frm = 0;\n        }\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   draw2 (ctx)\u539f\u5730\u4e0d\u52a8\u753b\u98de\u673a\uff0c\u56e0\u4e3a\u5df1\u65b9\u98de\u673a\u662f\u4eba\u5de5\u63a7\u5236\u79fb\u52a8\u7684\uff0c\u6240\u4ee5\u9700\u8981\u6b64\u51fd\u6570\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">Plan.prototype.draw2 = function (ctx) {\n        ctx.save();\n        ctx.translate(this.x, this.y);\n        ctx.drawImage(this.image, this.frm *this.width, 0 , this.width, this.height,\n0, 0, this.width, this.height);\n        ctx.restore();\n        this.dis++;\n        if (this.dis &gt;= 3) {\/\/3\u4e2a\u95f4\u9694\u6362\u56fe\n            this.dis = 0;\n            this.frm++;\n            if (this.frm &gt;= this.n) this.frm = 0;\n        }\n    };\n    \/\/\u98de\u673a\u4e4b\u95f4\u78b0\u649e\u68c0\u6d4b\n    \/\/\u5982\u679c\u91cd\u53e0\u5219\u8bf4\u660e\u98de\u673a\u78b0\u649e\u3002\n    Plan.prototype.hitTestObject = function (planobj) {\n        if(isColliding(this.x,this.y,this.width,this.height,\n    planobj.x,planobj.y,planobj.width,planobj.height))    \/\/\u53d1\u751f\u78b0\u649e\n            return true;\n        else\n            return false;\n    }<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    3\u3001\u7206\u70b8\u7c7b<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u7206\u70b8\u52a8\u753b\u88ab\u53eb\u7b80\u5355\uff0c\u53ea\u9700\u539f\u5730\u7ed8\u5236\u7206\u70b8\u76846\u5e27\u5c31\u53ef\u4ee5\uff0c\u6548\u679c\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<div style=\"text-align:center;\">\n<figure class=\"image\">\n   <\/figure>\n<\/p><\/div>\n<p style=\"text-indent:33px;\">\n   \u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">\/\/\u7206\u70b8\u52a8\u753b\n    var Bomb= function (image, x, y) {\n        this.image = image;\n        this.x = x;\n        this.y = y;\n        this.width = image.width\/6;\n        this.height = image.height ;\n        this.frm = 0;\n        this.dis = 0;\n    };\n    Bomb.prototype.draw2 = function (ctx) {\n        ctx.save();\n        ctx.translate(this.x, this.y);\n        if (this.frm &gt;= 6) return ;\/\/6\u5e27\u7ed8\u5236\u5c31\u7ed3\u675f\u4e86\n        ctx.drawImage(this.image, this.frm *this.width, 0 , this.width, this.height, \n                        0, 0, this.width, this.height);\n        ctx.restore(); \n        this.dis++;\n        if (this.dis &gt;= 10) {\/\/10\u4e2a\u95f4\u9694\u6362\u56fe\n            this.dis = 0;\n            this.frm++;\n        }\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    4\u3001\u8bbe\u8ba1\u4e3b\u7a0b\u5e8f<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u7528\u4e8e\u5b9e\u73b0\u6e38\u620f\u80cc\u666f\u754c\u9762\uff0c\u52a0\u8f7d\u6e38\u620f\u76f8\u5173\u56fe\u7247\uff0c\u5b8c\u6210\u5b50\u5f39\u53d1\u5c04\u3001\u654c\u673a\u79fb\u52a8\uff0c\u78b0\u649e\u68c0\u6d4b\u7b49\u529f\u80fd\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\"> var canvas = document.getElementById(\"myCanvas\");\n    var context = canvas.getContext(\"2d\");\n    document.addEventListener(\"keydown\", onkeydown);\n    var plans = [];         \/\/\u654c\u673a\u5bf9\u8c61\u6570\u7ec4\n    var bullets = [];        \/\/\u5b50\u5f39\u5bf9\u8c61\u6570\u7ec4\n    var bombs = [];        \/\/\u7206\u70b8\u5bf9\u8c61\u6570\u7ec4\n    var score=0;\n    var overflag = false; \/\/\u6e38\u620f\u662f\u5426\u7ed3\u675f\uff0ctrue\u4e3a\u7ed3\u675f\n    var mBitposY0, mBitposY1; \n    \/** \u5c4f\u5e55\u7684\u5bbd\u9ad8* *\/\n    var mScreenWidth = 320;\n    var mScreenHeight = 480\n\n    var myplane;\/\/\u5df1\u65b9\u98de\u673a\n    var image = new Image();\n    var image2 = new Image();\n    var image3 = new Image();\n    var image4 = new Image();\n    var image5 = new Image();\n\/\/\u4ee5\u4e0b\u6e38\u620f\u80cc\u666f\u7684\u4e24\u5f20\u56fe\u7247\n    var background0 = new Image();\n    background0.src = \"map_0.png\";\n    var background1 = new Image();\n    background1.src = \"map_1.png\";<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   init()\u521d\u59cb\u5316\u6e38\u620f\u80cc\u666f\u7684\u4e24\u5f20\u56fe\u7247\u7684\u521d\u59cb\u4f4d\u7f6e\uff0cupdateBg()\u901a\u8fc7\u8fd9\u4e24\u5f20\u80cc\u666f\u56fe\u7247\u7684\u4e0d\u65ad\u4e0b\u79fb\u548c\u5207\u6362\u5b9e\u73b0\u6e38\u620f\u80cc\u666f\u52a8\u6001\u79fb\u52a8\u6548\u679c\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">function init() {\n        \/** \u6e38\u620f\u80cc\u666f* *\/\n        \/** \u7b2c\u4e00\u5f20\u56fe\u7247\u6d25\u8d34\u5728\u5c4f\u5e55(0,0)\u70b9\uff0c\u7b2c\u4e8c\u5f20\u56fe\u7247\u5728\u7b2c\u4e00\u5f20\u56fe\u7247\u4e0a\u65b9* *\/\n        mBitposY0 = 0;\n        mBitposY1 = -mScreenHeight;        \n    }\n    function updateBg() {\n        \/** \u66f4\u65b0\u6e38\u620f\u80cc\u666f\u56fe\u7247\u5b9e\u73b0\u5411\u4e0b\u6eda\u52a8\u6548\u679c**\/\n        mBitposY0 += 5;\n        mBitposY1 += 5;\n        if (mBitposY0 == mScreenHeight) {\n            mBitposY0 = -mScreenHeight;\n        }\n        if (mBitposY1 == mScreenHeight) {\n            mBitposY1 = -mScreenHeight;\n        }\n    }\n    image.src = \"plan.png\";\/\/\u81ea\u5df1\u98de\u673a\u56fe\u7247\n    image.onload = function () {\n    };\n    image2.src = \"bomb.png\";\/\/\u7206\u70b8\u56fe\u7247\n    image2.onload = function () {\n    };\n    image3.src = \"enemy.png\";\/\/\u654c\u673a\u56fe\u7247<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   \u56fe\u7247\u52a0\u8f7d\u6210\u529f\u540e\uff0c\u901a\u8fc7\u5b9a\u65f6\u6bcf3\u79d2\u4ea7\u751f1\u67b6\u654c\u673a\uff0c\u5728\u53e6\u4e00\u4e2a\u5b9a\u65f6\u5668\u4e2d\u4e0d\u65ad\u66f4\u65b0\u80cc\u666f\u56fe\u7247\u4f4d\u7f6e\uff0c\u753b\u81ea\u5df1\u65b9\u98de\u673a\u548c\u654c\u673a\uff0c\u5e76\u68c0\u6d4b\u662f\u5426\u654c\u673a\u78b0\u5230\u73a9\u5bb6\u81ea\u5df1\u98de\u673a\uff08\u5219\u6e38\u620f\u7ed3\u675f\uff09\u6216\u8005\u5b50\u5f39\u78b0\u5230\u654c\u673a\uff0c\u6700\u540e\u7ed8\u5236\u7206\u70b8\u5bf9\u8c61\uff0c\u5b9e\u73b0\u6e38\u620f\u903b\u8f91\u3002\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u5982\u679c\u5b50\u5f39\u78b0\u649e\u5230\u654c\u673a\uff0c\u5219\u4ea7\u751f\u7206\u70b8\u5bf9\u8c61\uff0c\u4ece\u654c\u673a\u6570\u7ec4plans\u4e2d\u5220\u9664\u8be5\u654c\u673a\uff0c\u4ece\u5b50\u5f39\u6570\u7ec4bullets\u4e2d\u5220\u9664\u78b0\u649e\u7684\u5b50\u5f39\u3002\u5982\u679c\u6ca1\u51fb\u4e2d\u654c\u673a\uff0c\u518d\u5224\u65ad\u5b50\u5f39\u662f\u5426\u98de\u51fa\u5c4f\u5e55\u4e0a\u65b9\uff0c\u98de\u51fa\u5c4f\u5e55\u4e0a\u65b9\u5219\u4ece\u6570\u7ec4bullets\u4e2d\u5220\u9664\u78b0\u649e\u7684\u5b50\u5f39\u3002\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">image3.onload = function () {\n        myplane = new Plan(image, 300 * Math.random(), 400, 6); \/\/6\u5e45\u56fe\u7247\n        init(); \/\/\u521d\u59cb\u5316\u80cc\u666f\u5730\u56fe\u4f4d\u7f6e\n        plan_interval = setInterval(function () {\n            plans.push(new Plan(image3, 300 * Math.random(), 20 * Math.random(), 2)); \/\/2\u5e45\u56fe\u7247\n        }, 3000); \/\/3\u79d2\u4ea7\u751f1\u67b6\u654c\u673a\n        setInterval(function () {\n            context.clearRect(0, 0, 320, 480);\n            \/\/\u753b\u5730\u56fe\n            \/\/context.drawImage(background, 0, 0);\n            context.drawImage(background0, 0, mBitposY0);\n            context.drawImage(background1, 0, mBitposY1);\n            updateBg();\/\/\u66f4\u65b0\u80cc\u666f\u56fe\u7247\u4f4d\u7f6e\n            \/\/\u753b\u81ea\u5df1\u65b9\u98de\u673a\n            if (!overflag)\/\/\u6e38\u620f\u6ca1\u6709\u7ed3\u675f\n                myplane.draw2(context); \/\/\u539f\u5730\u4e0d\u52a8\n            \/\/\u753b\u654c\u4eba\u98de\u673a\n            for (var i = plans.length - 1; i &gt;= 0; i--) {\n                if (plans[i].Y() &gt; 400) \/\/\u654c\u673a\u98de\u5230\u5e95\u90e8\u5219\u6d88\u5931\n                    plans.splice(i, 1); \/\/\u5220\u9664\u654c\u673a\n                else\n                    plans[i].draw(context);\n            }\n\n            \/\/\u753b\u5b50\u5f39\n            for (var i = bullets.length - 1; i &gt;= 0; i--) {\n                if (bullets[i].Y() &lt; 0)\n                    bullets.splice(i, 1); \/\/\u5220\u9664\u5b50\u5f39\n                else\n                    bullets[i].draw(context);\n            }\n            \/\/\u78b0\u649e\u68c0\u6d4b\n            \/\/\u5224\u65ad\u654c\u673a\u78b0\u5230\u73a9\u5bb6\u81ea\u5df1\u98de\u673a\n            for (var i = plans.length - 1; i &gt;= 0; i--) {\n                e1 = plans[i];\n                if (e1 != null &amp;&amp; myplane != null &amp;&amp; myplane.hitTestObject(e1)) {\n                    clearInterval(plan_interval); \/\/\u6e05\u9664\u5b9a\u65f6\u5668\uff0c\u4e0d\u518d\u4ea7\u751f\u654c\u673a\n                    plans.splice(i, 1); \/\/\u5220\u9664\u654c\u673a\n                    bombs.push(new Bomb(image2, myplane.x, myplane.y));\n                    \/\/bomb_interval=setInterval(function () {\n                    \/\/    bomb.draw2(context);\/\/\u539f\u5730\u4e0d\u52a8\n                    \/\/}, 1000 \/ 60);                   \n                    message_txt.innerHTML = \"\u654c\u673a\u78b0\u5230\u73a9\u5bb6\u81ea\u5df1\u98de\u673a,\u6e38\u620f\u7ed3\u675f\";\n                    overflag = true;\n                }\n            }\n\n            \/\/\u5224\u65ad\u5b50\u5f39\u78b0\u5230\u654c\u673a\n            for (var j = bullets.length - 1; j &gt;= 0; j--) {\n                var b1 = bullets[j];\n                for (var i = plans.length - 1; i &gt;= 0; i--) {\n                    e1 = plans[i];\n                    if (e1 != null &amp;&amp; b1 != null &amp;&amp; b1.hitTestObject(e1))\/\/\u51fb\u4e2d\u654c\u673a\n                    {\n                        plans.splice(i, 1); \/\/\u5220\u9664\u654c\u673a\n                        bullets.splice(i, 1); \/\/\u5220\u9664\u6b64\u9897\u5b50\u5f39\n                        bombs.push(new Bomb(image2, b1.x, b1.y - 36));\n                        message_txt.innerHTML = \"\u654c\u673a\u88ab\u51fb\u4e2d\uff0c\u52a020\u5206\";\n                        score += 20;\n                        score_txt.innerHTML = \"\u5206\u6570\uff1a\" + score + \"\u5206\";\n                    }\n                }\n            }\n\n            \/\/\u753b\u7206\u70b8\n            for (var i = bombs.length - 1; i &gt;= 0; i--) {\n                if (bombs[i].frm &gt;= 6)\n                    bombs.splice(i, 1); \/\/\u5220\u9664\u7206\u70b8\n                else\n                    bombs[i].draw2(context);\n            }\n        }, 1000 \/ 60);\n    };\n    image4.src = \"bullet.png\";\/\/\u5b50\u5f39\u56fe\u7247\n    image4.onload = function () {\n    };<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   \u7528\u6237\u6309\u952e\u63a7\u5236\u98de\u673a\u4e0a\u4e0b\u5de6\u53f3\u79fb\u52a8\uff0c\u53ca\u7a7a\u683c\u53d1\u5c04\u5b50\u5f39\u3002onkeydown(e)\u54cd\u5e94\u7528\u6237\u7684\u6309\u952e\u64cd\u4f5c\uff0c\u4fee\u6539\u73a9\u5bb6\u81ea\u5df1\u98de\u673a\u7684\u5750\u6807\uff0c\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">function onkeydown(e) {\n        if (e.keyCode==32) {\/\/\u7a7a\u683c\n           \/\/\u53d1\u5c04\u5b50\u5f39\n            bullets.push(new Bullet(image4, myplane.x, myplane.y-36));\/\/\n        }else if (e.keyCode==37) {\/\/\u5411\u5de6\n            myplane.move(-10,0);\n        }else if (e.keyCode==39) {\/\/\u5411\u53f3\n            myplane.move(10,0);\n        }else if (e.keyCode==38) {\/\/\u5411\u4e0a\n            myplane.move(0,-10);\n        }else if (e.keyCode==40) {\/\/\u5411\u4e0b\n            myplane.move(0,10);\n        }\n    }<\/code><\/pre>\n<p style=\"text-indent:33px;\">\n   <strong><br \/>\n    5\u3001\u6e38\u620f\u9875\u9762<br \/>\n   <\/strong>\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a\n  <\/p>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;\u98de\u673a\u5927\u62182017&lt;\/title&gt;\n&lt;meta charset=\"utf-8\"&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;canvas id=\"myCanvas\" width=\"320\" height=\"480\" style=\"border:solid\"&gt;\n\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301canvas\u753b\u5e03\u5143\u7d20\uff0c\u8bf7\u66f4\u65b0\u6d4f\u89c8\u5668\u83b7\u5f97\u6f14\u793a\u6548\u679c\u3002\n&lt;\/canvas&gt;\n&lt;div id=\"message_txt\" style=\"display:block;\"&gt;\u98de\u673a\u5927\u6218&lt;\/div&gt;\n&lt;div id=\"score_txt\" style=\"display:block;\"&gt;\u5206\u6570\uff1a0\u5206&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<hr\/>\n<p style=\"text-indent:33px;\">\n   \u9879\u76ee\u6574\u7406\u6765\u6e90\u4e8e\uff1a\u6e05\u534e\u8ba1\u7b97\u673a\u5b66\u5802\n  <\/p>\n<p style=\"text-indent:33px;\">\n   \u9879\u76ee\u6e90\u7801\u4e0b\u8f7d\uff1a\u5173\u6ce8\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u56de\u590d\u5173\u952e\u5b57\uff1a<br \/>\n   <strong><br \/>\n    <a href=\"https:\/\/download.csdn.net\/download\/m0_38106923\/12914083\"><br \/>\n     \u98de\u673a\u5c04\u51fb\u6e38\u620f<br \/>\n    <\/a><br \/>\n   <\/strong><br \/>\n   \uff0c\u83b7\u53d6\u9879\u76ee\u8d44\u6e90~\n  <\/p>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 1\u3001\u6e38\u620f\u8bbe\u8ba1\u601d\u8def 2\u3001\u98de\u673a\u5c04\u51fb\u6e38\u620f\u8bbe\u8ba1\u6b65\u9aa4 \u672c\u7bc7\u535a\u6587\u5c06\u5206\u4eab\u4e00\u7bc7\u57fa\u4e8eHTML\u7684\u7b80\u5355\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\uff0c\u4e0b\u65b9\u662f\u73a9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/\u57fa\u4e8ehtml\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 1\u3001\u6e38\u620f\u8bbe\u8ba1\u601d\u8def 2\u3001\u98de\u673a\u5c04\u51fb\u6e38\u620f\u8bbe\u8ba1\u6b65\u9aa4 \u672c\u7bc7\u535a\u6587\u5c06\u5206\u4eab\u4e00\u7bc7\u57fa\u4e8eHTML\u7684\u7b80\u5355\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\uff0c\u4e0b\u65b9\u662f\u73a9 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/\u57fa\u4e8ehtml\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-02T22:00:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\",\"datePublished\":\"2025-04-02T22:00:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/\"},\"wordCount\":33,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u5c04\u51fb\u6e38\u620f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/\",\"name\":\"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-02T22:00:18+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wunen.com\/#website\",\"url\":\"https:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"https:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/\u57fa\u4e8ehtml\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\/","og_locale":"zh_CN","og_type":"article","og_title":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u76ee\u5f55 1\u3001\u6e38\u620f\u8bbe\u8ba1\u601d\u8def 2\u3001\u98de\u673a\u5c04\u51fb\u6e38\u620f\u8bbe\u8ba1\u6b65\u9aa4 \u672c\u7bc7\u535a\u6587\u5c06\u5206\u4eab\u4e00\u7bc7\u57fa\u4e8eHTML\u7684\u7b80\u5355\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\uff0c\u4e0b\u65b9\u662f\u73a9 [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/\u57fa\u4e8ehtml\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-02T22:00:18+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f","datePublished":"2025-04-02T22:00:18+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/"},"wordCount":33,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u5c04\u51fb\u6e38\u620f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/","name":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-02T22:00:18+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/03\/%e5%9f%ba%e4%ba%8ehtml%e7%9a%84%e9%a3%9e%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8eHTML\u7684\u98de\u673a\u5c04\u51fb\u6e38\u620f"}]},{"@type":"WebSite","@id":"https:\/\/www.wunen.com\/#website","url":"https:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"https:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=464"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}