{"id":1066,"date":"2024-07-27T01:54:20","date_gmt":"2024-07-26T17:54:20","guid":{"rendered":"http:\/\/codermr.com\/?p=1066"},"modified":"2024-07-27T10:23:01","modified_gmt":"2024-07-27T02:23:01","slug":"html_css_article3","status":"publish","type":"post","link":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/","title":{"rendered":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49"},"content":{"rendered":"\n<p>HTML \u53ef\u4ee5\u901a\u8fc7 &lt;div&gt; \u548c &lt;span&gt;\u5c06\u5143\u7d20\u7ec4\u5408\u8d77\u6765\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML \u533a\u5757\u5143\u7d20<\/h2>\n\n\n\n<p>\u5927\u591a\u6570 HTML \u5143\u7d20\u88ab\u5b9a\u4e49\u4e3a <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u5757\u7ea7\u5143\u7d20<\/mark><\/strong> \u6216 <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u5185\u8054\u5143\u7d20<\/mark><\/strong> \u3002<\/p>\n\n\n\n<p>\u5757\u7ea7\u5143\u7d20\u5728\u6d4f\u89c8\u5668\u663e\u793a\u65f6\uff0c\u901a\u5e38\u4f1a\u4ee5\u65b0\u884c\u6765\u5f00\u59cb\uff08\u548c\u7ed3\u675f\uff09\u3002<\/p>\n\n\n\n<p>\u5b9e\u4f8b: &lt;h1&gt;, &lt;p&gt;, &lt;ul&gt;, &lt;table&gt;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML \u5185\u8054\u5143\u7d20<\/h2>\n\n\n\n<p>\u5185\u8054\u5143\u7d20\u5728\u663e\u793a\u65f6\u901a\u5e38\u4e0d\u4f1a\u4ee5\u65b0\u884c\u5f00\u59cb\u3002<\/p>\n\n\n\n<p>\u5b9e\u4f8b: &lt;b&gt;, &lt;td&gt;, &lt;a&gt;, &lt;img&gt;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">&lt;div&gt; \u5143\u7d20<\/h2>\n\n\n\n<p>HTML <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">&lt;div&gt; \u5143\u7d20\u662f\u5757\u7ea7\u5143\u7d20<\/mark>\uff0c\u5b83\u53ef\u7528\u4e8e\u7ec4\u5408\u5176\u4ed6 HTML \u5143\u7d20\u7684\u5bb9\u5668\u3002<\/p>\n\n\n\n<p>&lt;div&gt; \u5143\u7d20\u6ca1\u6709\u7279\u5b9a\u7684\u542b\u4e49\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u7531\u4e8e\u5b83\u5c5e\u4e8e\u5757\u7ea7\u5143\u7d20\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong>\u6d4f\u89c8\u5668\u4f1a\u5728 &lt;div&gt; \u524d\u540e\u663e\u793a\u6298\u884c<\/strong><\/mark>\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4e0e CSS \u4e00\u540c\u4f7f\u7528\uff0c&lt;div&gt; \u5143\u7d20\u53ef\u7528\u4e8e\u5bf9\u5927\u7684\u5185\u5bb9\u5757\u8bbe\u7f6e\u6837\u5f0f\u5c5e\u6027\u3002<\/p>\n\n\n\n<p>&lt;div&gt; \u5143\u7d20\u7684\u53e6\u4e00\u4e2a\u5e38\u89c1\u7684\u7528\u9014\u662f\u6587\u6863\u5e03\u5c40\u3002\u5b83\u53d6\u4ee3\u4e86\u4f7f\u7528\u8868\u683c\u5b9a\u4e49\u5e03\u5c40\u7684\u8001\u5f0f\u65b9\u6cd5\u3002\u4f7f\u7528 &lt;table&gt; \u5143\u7d20\u8fdb\u884c\u6587\u6863\u5e03\u5c40\u4e0d\u662f\u8868\u683c\u7684\u6b63\u786e\u7528\u6cd5\u3002&lt;table&gt; \u5143\u7d20\u7684\u4f5c\u7528\u662f\u663e\u793a\u8868\u683c\u5316\u7684\u6570\u636e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">&lt;span&gt; \u5143\u7d20<\/h2>\n\n\n\n<p>HTML &lt;span&gt; \u5143\u7d20\u662f\u5185\u8054\u5143\u7d20\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u53ef\u7528\u4f5c\u6587\u672c\u7684\u5bb9\u5668<\/mark><\/p>\n\n\n\n<p>&lt;span&gt; \u5143\u7d20\u4e5f\u6ca1\u6709\u7279\u5b9a\u7684\u542b\u4e49\u3002<\/p>\n\n\n\n<p>\u5f53\u4e0e CSS \u4e00\u540c\u4f7f\u7528\u65f6\uff0c&lt;span&gt; \u5143\u7d20\u53ef\u7528\u4e8e\u4e3a\u90e8\u5206\u6587\u672c\u8bbe\u7f6e\u6837\u5f0f\u5c5e\u6027\u3002<\/p>\n\n\n\n<p><strong>\uff08\u4e00\uff09\u4f7f\u7528 DIV \u5e03\u5c40 Demo<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;body&gt;\n\n    &lt;div id=\"container\" style=\"width:500px\"&gt;\n        &lt;div id=\"header\" style=\"background-color:#FFA500;\"&gt;\n            &lt;h1 style=\"margin-bottom:0;\"&gt;\u4e3b\u8981\u7684\u7f51\u9875\u6807\u9898&lt;\/h1&gt;\n        &lt;\/div&gt;\n\n        &lt;!-- \u4f7f\u7528 float:left; \u4f7f\u5176\u9760\u5de6\u6d6e\u52a8 --&gt;\n        &lt;div id=\"menu\" style=\"background-color:#FFD700;height:200px;width:100px;float:left;\"&gt;\n            &lt;b&gt;\u83dc\u5355&lt;\/b&gt;\n            &lt;br&gt;\n            HTML\n            &lt;br&gt;\n            CSS\n            &lt;br&gt;\n            JavaScript\n        &lt;\/div&gt;\n\n        &lt;!-- \u4f7f\u7528 float:left; \u4f7f\u5176\u9760\u5de6\u6d6e\u52a8 --&gt;\n        &lt;div id=\"content\" style=\"background-color:#EEEEEE;height:200px;width:400px;float:left;\"&gt;\n            \u5185\u5bb9\u5728\u8fd9\u91cc\n        &lt;\/div&gt;\n\n        &lt;div id=\"footer\" style=\"background-color:#FFA500;clear:both;text-align:center;\"&gt;\n            \u7248\u6743 \u00a9 runoob.com\n        &lt;\/div&gt;\n\n    &lt;\/div&gt;\n\n&lt;\/body&gt;<\/code><\/pre>\n\n\n\n<p>\u663e\u793a\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"267\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-1.png\" alt=\"\" class=\"wp-image-1067\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-1.png 507w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-1-300x158.png 300w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/><\/a><\/figure>\n\n\n\n<p><strong>\uff08\u4e8c\uff09\u4f7f\u7528 div \u5e03\u5c40 Demo<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;body&gt;\n\n    &lt;table width=\"500\" border=\"0\"&gt;\n        &lt;tr&gt;\n            &lt;td colspan=\"2\" style=\"background-color:#FFA500;\"&gt;\n                &lt;h1&gt;\u4e3b\u8981\u7684\u7f51\u9875\u6807\u9898&lt;\/h1&gt;\n            &lt;\/td&gt;\n        &lt;\/tr&gt;\n\n        &lt;tr&gt;\n            &lt;td style=\"background-color:#FFD700;width:100px;vertical-align:top;\"&gt;\n                &lt;b&gt;\u83dc\u5355&lt;\/b&gt;\n                &lt;br&gt;\n                HTML\n                &lt;br&gt;\n                CSS\n                &lt;br&gt;\n                JavaScript\n            &lt;\/td&gt;\n            &lt;td style=\"background-color:#eeeeee;height:200px;width:400px;vertical-align:top;\"&gt;\n                \u5185\u5bb9\u5728\u8fd9\u91cc\n            &lt;\/td&gt;\n        &lt;\/tr&gt;\n\n        &lt;tr&gt;\n            &lt;td colspan=\"2\" style=\"background-color:#FFA500;text-align:center;\"&gt;\n                \u7248\u6743 \u00a9 runoob.com&lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/table&gt;\n\n&lt;\/body&gt;<\/code><\/pre>\n\n\n\n<p>\u663e\u793a\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"323\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-2.png\" alt=\"\" class=\"wp-image-1068\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-2.png 503w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/image-2-300x193.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">HTML \u8868\u5355<\/h2>\n\n\n\n<ul>\n<li><code>&lt;form><\/code>\u00a0\u5143\u7d20\u7528\u4e8e\u521b\u5efa\u8868\u5355\uff0c<code>action<\/code>\u00a0\u5c5e\u6027\u5b9a\u4e49\u4e86\u8868\u5355\u6570\u636e\u63d0\u4ea4\u7684\u76ee\u6807 URL\uff0c<code>method<\/code>\u00a0\u5c5e\u6027\u5b9a\u4e49\u4e86\u63d0\u4ea4\u6570\u636e\u7684 HTTP \u65b9\u6cd5\uff08\u8fd9\u91cc\u4f7f\u7528\u7684\u662f &#8220;post&#8221;\uff09\u3002<\/li>\n\n\n\n<li><code>&lt;label><\/code>\u00a0\u5143\u7d20\u7528\u4e8e\u4e3a\u8868\u5355\u5143\u7d20\u6dfb\u52a0\u6807\u7b7e\uff0c\u63d0\u9ad8\u53ef\u8bbf\u95ee\u6027\u3002<\/li>\n\n\n\n<li><code>&lt;input><\/code>\u00a0\u5143\u7d20\u662f\u6700\u5e38\u7528\u7684\u8868\u5355\u5143\u7d20\u4e4b\u4e00\uff0c\u5b83\u53ef\u4ee5\u521b\u5efa\u6587\u672c\u8f93\u5165\u6846\u3001\u5bc6\u7801\u6846\u3001\u5355\u9009\u6309\u94ae\u3001\u590d\u9009\u6846\u7b49\u3002<code>type<\/code>\u00a0\u5c5e\u6027\u5b9a\u4e49\u4e86\u8f93\u5165\u6846\u7684\u7c7b\u578b\uff0c<code>id<\/code>\u00a0\u5c5e\u6027\u7528\u4e8e\u5173\u8054\u00a0<code>&lt;label><\/code>\u00a0\u5143\u7d20\uff0c<code>name<\/code>\u00a0\u5c5e\u6027\u7528\u4e8e\u6807\u8bc6\u8868\u5355\u5b57\u6bb5\u3002<\/li>\n\n\n\n<li><code>&lt;select><\/code>\u00a0\u5143\u7d20\u7528\u4e8e\u521b\u5efa\u4e0b\u62c9\u5217\u8868\uff0c\u800c\u00a0<code>&lt;option><\/code>\u00a0\u5143\u7d20\u7528\u4e8e\u5b9a\u4e49\u4e0b\u62c9\u5217\u8868\u4e2d\u7684\u9009\u9879\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5e38\u7528\u8f93\u5165\u7c7b\u578b\u7684\u6807\u7b7e<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">&lt;input> \u6807\u7b7e<\/h2>\n\n\n\n<p><span style=\"color: rgb(51, 51, 51); font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(236, 234, 230); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">&lt;input><\/span>\u00a0\u6807\u7b7e\uff0c\u5176\u8f93\u5165\u7c7b\u578b\u662f\u7531\u00a0<strong>type<\/strong>\u00a0\u5c5e\u6027\u5b9a\u4e49\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;form>\n    First name: &lt;input type=\"text\" name=\"firstname\">&lt;br>\n    Last name: &lt;input type=\"text\" name=\"lastname\">\n\n    &lt;!-- \u5bc6\u7801\u5b57\u6bb5 -->\n    Password: &lt;input type=\"password\" name=\"pwd\">\n\n    &lt;!-- \u5355\u9009\u6309\u94ae -->\n    &lt;input type=\"radio\" name=\"sex\" value=\"male\">\u7537\n    &lt;br>\n    &lt;input type=\"radio\" name=\"sex\" value=\"female\">\u5973\n    \n    &lt;!-- \u590d\u9009\u6846 -->\n    &lt;input type=\"checkbox\" name=\"vehicle&#91;]\" value=\"Bike\">\u6211\u559c\u6b22\u81ea\u884c\u8f66\n    &lt;br>\n    &lt;input type=\"checkbox\" name=\"vehicle&#91;]\" value=\"Car\">\u6211\u559c\u6b22\u5c0f\u6c7d\u8f66\n\n    &lt;!-- \u63d0\u4ea4\u6309\u94ae -->\n    &lt;input type=\"submit\" value=\"Submit\">\n&lt;\/form><\/code><\/pre>\n\n\n\n<p>\u53c2\uff1a<a href=\"https:\/\/www.runoob.com\/html\/html-forms.html\">https:\/\/www.runoob.com\/html\/html-forms.html<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">iframe \u7528\u6cd5<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;iframe src=\"URL\">&lt;\/iframe><\/code><\/pre>\n\n\n\n<p><strong>iframe &#8211; \u79fb\u9664\u8fb9\u6846<\/strong><\/p>\n\n\n\n<p>frameborder \u5c5e\u6027\u7528\u4e8e\u5b9a\u4e49iframe\u8868\u793a\u662f\u5426\u663e\u793a\u8fb9\u6846\u3002<\/p>\n\n\n\n<p>\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a &#8220;0&#8221; \u79fb\u9664iframe\u7684\u8fb9\u6846:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;iframe src=\"demo_iframe.htm\" frameborder=\"0\">&lt;\/iframe><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528 iFrame \u7684\u573a\u666f<\/h2>\n\n\n\n<p>1.\u00a0<a href=\"#\" target=\"_blank\" rel=\"noreferrer noopener\">\u6c99\u7bb1\u9694\u79bb<\/a>\u3002<\/p>\n\n\n\n<p>2. \u5f15\u7528\u7b2c\u4e09\u65b9\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>3. \u72ec\u7acb\u7684\u5e26\u6709\u4ea4\u4e92\u7684\u5185\u5bb9\uff0c\u6bd4\u5982<a href=\"#\" target=\"_blank\" rel=\"noreferrer noopener\">\u5e7b\u706f\u7247<\/a>\u3002<\/p>\n\n\n\n<p>4. \u9700\u8981\u4fdd\u6301\u72ec\u7acb\u7126\u70b9\u548c\u5386\u53f2\u7ba1\u7406\u7684\u5b50\u7a97\u53e3\uff0c\u5982\u590d\u6742\u7684Web\u5e94\u7528\u3002<\/p>\n\n\n\n<p>\u6ce8\uff1a\u767b\u5f55\u5f39\u7a97\u7528 iframe \u672a\u5fc5\u5408\u9002\u3002HTML\u6807\u51c6\u65b0\u589e\u4e86<a href=\"#\" target=\"_blank\" rel=\"noreferrer noopener\">dialog\u5143\u7d20<\/a>\uff0c\u53ef\u80fd\u66f4\u9002\u5408\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u4e0d\u63a8\u8350\u4f7f\u7528 iFrame \uff1f<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>iframe\u662f\u5168\u65b0\u7684\u4e00\u4e2a\u9875\u9762\uff0c\u6240\u6709\u8d44\u6e90\u6d88\u8017\u90fd\u4f1a+1\u3002<br><br><strong>\u6027\u80fd\u95ee\u9898\uff1a<\/strong><br>\u4f7f\u7528 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">&lt;iframe> \u4f1a\u5f15\u5165\u989d\u5916\u7684\u9875\u9762\u6e32\u67d3\u548c\u52a0\u8f7d\u8fc7\u7a0b<\/mark>\uff0c\u589e\u52a0\u9875\u9762\u7684\u590d\u6742\u5ea6\u548c\u52a0\u8f7d\u65f6\u95f4\u3002\u6bcf\u4e2a &lt;iframe> \u90fd\u9700\u8981\u72ec\u7acb\u52a0\u8f7d\u548c\u6e32\u67d3\uff0c\u53ef\u80fd\u5bfc\u81f4\u9875\u9762\u6027\u80fd\u4e0b\u964d\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u5927\u91cf &lt;iframe> \u7684\u60c5\u51b5\u4e0b\u3002<br><br><strong>\u65e0\u6cd5\u4fdd\u6301\u7f51\u9875\u72b6\u6001\uff1a<\/strong><br>&lt;iframe> \u662f\u4e00\u79cd\u5d4c\u5957\u9875\u9762\u7684\u65b9\u5f0f\uff0c\u6bcf\u4e2a &lt;iframe> \u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u72ec\u7acb\u7684\u6587\u6863\u4e0a\u4e0b\u6587\u3002\u8fd9\u610f\u5473\u7740<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u5728\u4e3b\u9875\u9762\u548c &lt;iframe> \u4e4b\u95f4\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u548c\u64cd\u4f5c\u5f7c\u6b64\u7684 DOM \u5143\u7d20\uff0c\u4e5f\u65e0\u6cd5\u5171\u4eab\u72b6\u6001<\/mark>\u3002\u8fd9\u589e\u52a0\u4e86\u8de8\u9875\u9762\u901a\u4fe1\u548c\u6570\u636e\u540c\u6b65\u7684\u590d\u6742\u6027\u3002<br><br><strong>SEO\uff08\u641c\u7d22\u5f15\u64ce\u4f18\u5316\uff09\u95ee\u9898\uff1a<\/strong><br>\u641c\u7d22\u5f15\u64ce\u901a\u5e38\u4e0d\u4f1a\u89e3\u6790\u548c\u7d22\u5f15 &lt;iframe> \u5185\u90e8\u7684\u5185\u5bb9\uff0c\u56e0\u6b64\u5982\u679c\u91cd\u8981\u7684\u5185\u5bb9\u88ab\u653e\u5728 &lt;iframe> \u4e2d\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u641c\u7d22\u5f15\u64ce\u65e0\u6cd5\u6b63\u786e\u6293\u53d6\u548c\u7406\u89e3\u7f51\u9875\u7684\u5185\u5bb9\u3002<br><br><strong>\u5b89\u5168\u98ce\u9669\uff1a<\/strong><br>\u7531\u4e8e &lt;iframe> \u5141\u8bb8\u52a0\u8f7d\u5916\u90e8\u7f51\u9875\uff0c\u5b58\u5728\u7740\u5b89\u5168\u95ee\u9898\u3002\u6076\u610f\u7f51\u7ad9\u53ef\u4ee5\u901a\u8fc7 &lt;iframe> \u6ce8\u5165\u6076\u610f\u5185\u5bb9\u3001\u8fdb\u884c<a href=\"https:\/\/www.zhihu.com\/search?q=%E7%82%B9%E5%87%BB%E5%8A%AB%E6%8C%81&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A%223282451668%22%7D\" target=\"_blank\" rel=\"noreferrer noopener\">\u70b9\u51fb\u52ab\u6301<\/a>\uff08clickjacking\uff09\u7b49\u653b\u51fb\u3002\u5c24\u5176\u662f\u5728\u52a0\u8f7d\u4e0d\u53d7\u4fe1\u4efb\u7684\u7b2c\u4e09\u65b9\u7f51\u9875\u65f6\uff0c\u9700\u8981\u683c\u5916\u8c28\u614e\u3002<br><br><strong>\u54cd\u5e94\u5f0f\u5e03\u5c40\u95ee\u9898\uff1a<\/strong><br>\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\uff0c\u7279\u522b\u662f\u5c0f\u5c4f\u5e55\u4e0a\uff0c&lt;iframe> \u7684\u4f7f\u7528\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5e03\u5c40\u95ee\u9898\u548c\u7528\u6237\u4f53\u9a8c\u4e0d\u4f73\u3002<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u56e0\u4e3a &lt;iframe> \u7684\u5927\u5c0f\u901a\u5e38\u662f\u56fa\u5b9a\u7684\uff0c\u4e0d\u4f1a\u81ea\u9002\u5e94\u5c4f\u5e55\u5927\u5c0f\u3002<\/mark><br><br>\u5c3d\u7ba1 &lt;iframe> \u6709\u4e00\u4e9b\u7279\u5b9a\u7684\u4f7f\u7528\u573a\u666f\uff08\u5982\u5d4c\u5165\u7b2c\u4e09\u65b9\u5185\u5bb9\uff09\uff0c\u4f46\u5728\u4e00\u822c\u7684\u524d\u7aef\u5f00\u53d1\u4e2d\uff0c\u5e94\u5c3d\u91cf\u907f\u514d\u8fc7\u5ea6\u4f7f\u7528 &lt;iframe>\u3002\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5176\u4ed6\u66ff\u4ee3\u65b9\u6848\uff0c\u5982 AJAX\u3001\u7ec4\u4ef6\u5316\u5f00\u53d1\u3001\u52a8\u6001\u52a0\u8f7d\u5185\u5bb9\u7b49\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3001\u53ef\u7ef4\u62a4\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<cite>\u53c2\uff1a<a href=\"https:\/\/www.zhihu.com\/question\/23683645\/answer\/2672342843\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.zhihu.com\/question\/23683645\/answer\/2672342843<\/a><\/cite><\/blockquote>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML \u53ef\u4ee5\u901a\u8fc7 &lt;div&gt; \u548c &lt;span&gt;\u5c06\u5143\u7d20\u7ec4\u5408\u8d77\u6765\u3002 HTML \u533a\u5757\u5143\u7d20 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1059,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[61],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2<\/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:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"HTML \u53ef\u4ee5\u901a\u8fc7 &lt;div&gt; \u548c &lt;span&gt;\u5c06\u5143\u7d20\u7ec4\u5408\u8d77\u6765\u3002 HTML \u533a\u5757\u5143\u7d20 ...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-26T17:54:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-27T02:23:01+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/html1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"304\" \/>\n\t<meta property=\"og:image:height\" content=\"304\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u7801\u5148\u751f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/mrcode2021\" \/>\n<meta name=\"twitter:site\" content=\"@mrcode2021\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7801\u5148\u751f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\"},\"author\":{\"name\":\"\u7801\u5148\u751f\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"headline\":\"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49\",\"datePublished\":\"2024-07-26T17:54:20+00:00\",\"dateModified\":\"2024-07-27T02:23:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\"},\"wordCount\":150,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"keywords\":[\"html_css_js\"],\"articleSection\":[\"\u524d\u7aef\u6280\u672f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\",\"url\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\",\"name\":\"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/#website\"},\"datePublished\":\"2024-07-26T17:54:20+00:00\",\"dateModified\":\"2024-07-27T02:23:01+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/codermr.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/codermr.com\/#website\",\"url\":\"http:\/\/codermr.com\/\",\"name\":\"\u7801\u5148\u751f\u7684\u535a\u5ba2\",\"description\":\"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP\",\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/codermr.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\",\"name\":\"\u7801\u5148\u751f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"contentUrl\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"width\":400,\"height\":400,\"caption\":\"\u7801\u5148\u751f\"},\"logo\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/codermr.com\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021\"],\"url\":\"http:\/\/codermr.com\/index.php\/author\/coderma\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2","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:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/","og_locale":"zh_CN","og_type":"article","og_title":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2","og_description":"HTML \u53ef\u4ee5\u901a\u8fc7 &lt;div&gt; \u548c &lt;span&gt;\u5c06\u5143\u7d20\u7ec4\u5408\u8d77\u6765\u3002 HTML \u533a\u5757\u5143\u7d20 ...","og_url":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/","og_site_name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","article_published_time":"2024-07-26T17:54:20+00:00","article_modified_time":"2024-07-27T02:23:01+00:00","og_image":[{"width":304,"height":304,"url":"http:\/\/codermr.com\/wp-content\/uploads\/2024\/07\/html1.jpg","type":"image\/jpeg"}],"author":"\u7801\u5148\u751f","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/mrcode2021","twitter_site":"@mrcode2021","twitter_misc":{"\u4f5c\u8005":"\u7801\u5148\u751f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#article","isPartOf":{"@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/"},"author":{"name":"\u7801\u5148\u751f","@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"headline":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49","datePublished":"2024-07-26T17:54:20+00:00","dateModified":"2024-07-27T02:23:01+00:00","mainEntityOfPage":{"@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/"},"wordCount":150,"commentCount":0,"publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"keywords":["html_css_js"],"articleSection":["\u524d\u7aef\u6280\u672f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/","url":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/","name":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49 - \u7801\u5148\u751f\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/codermr.com\/#website"},"datePublished":"2024-07-26T17:54:20+00:00","dateModified":"2024-07-27T02:23:01+00:00","breadcrumb":{"@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/codermr.com\/index.php\/2024\/07\/27\/html_css_article3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/codermr.com\/"},{"@type":"ListItem","position":2,"name":"HTML \u57fa\u7840\uff08\u4e09\uff09\uff1adiv\u3001span\u3001iframe\u7b49"}]},{"@type":"WebSite","@id":"http:\/\/codermr.com\/#website","url":"http:\/\/codermr.com\/","name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","description":"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP","publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/codermr.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf","name":"\u7801\u5148\u751f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/","url":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","contentUrl":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","width":400,"height":400,"caption":"\u7801\u5148\u751f"},"logo":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/codermr.com","https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021"],"url":"http:\/\/codermr.com\/index.php\/author\/coderma\/"}]}},"_links":{"self":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1066"}],"collection":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/comments?post=1066"}],"version-history":[{"count":4,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1066\/revisions"}],"predecessor-version":[{"id":1080,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1066\/revisions\/1080"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media\/1059"}],"wp:attachment":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media?parent=1066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/categories?post=1066"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/tags?post=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}