{"id":52253,"date":"2024-12-03T17:49:24","date_gmt":"2024-12-03T09:49:24","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52253\/"},"modified":"2024-12-03T17:49:24","modified_gmt":"2024-12-03T09:49:24","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0-html-%e5%a4%9a%e8%a1%8c%e6%96%87%e6%9c%ac%e7%9a%84%e6%82%ac%e5%81%9c%e4%b8%8b%e5%88%92%e7%ba%bf%e6%95%88%e6%9e%9c%ef%bc%9f-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52253\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f<\/h1>\n<p>\u5c0f\u4f19\u4f34\u4eec\u5bf9\u6587\u7ae0\u7f16\u7a0b\u611f\u5174\u8da3\u5417\uff1f\u662f\u5426\u6b63\u5728\u5b66\u4e60\u76f8\u5173\u77e5\u8bc6\u70b9\uff1f\u5982\u679c\u662f\uff0c\u90a3\u4e48\u672c\u6587\u300a\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\u300b\uff0c\u5c31\u5f88\u9002\u5408\u4f60\uff0c\u672c\u7bc7\u6587\u7ae0\u8bb2\u89e3\u7684\u77e5\u8bc6\u70b9\u4e3b\u8981\u5305\u62ec\u3002\u5728\u4e4b\u540e\u7684\u6587\u7ae0\u4e2d\u4e5f\u4f1a\u591a\u591a\u5206\u4eab\u76f8\u5173\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241119\/1732015300673c74c42850c.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u591a\u884c\u6587\u672c\u60ac\u505c\u6548\u679c\u4e0b\u5212\u7ebf<\/strong><\/p>\n<p>\u6587\u672c\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\u4ec5\u9650\u4e00\u884c\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u5728 css \u4e2d\u4f7f\u7528 inline \u5c5e\u6027\uff0c\u5c06 p \u5143\u7d20\u8bbe\u7f6e\u4e3a\u5185\u8054\u5143\u7d20\uff0c\u4ece\u800c\u5b9e\u73b0\u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5982\u4f55\u4fee\u6539\u4ee3\u7801\uff1a<\/p>\n<p>\u5728 &lt;p&gt; \u5143\u7d20\u4e2d\u6dfb\u52a0 class=&#8221;test&#8221; \u5c5e\u6027\uff1a<\/p>\n<pre>&lt;p class=\"test\"&gt;\n    \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c\n    ...\n&lt;\/p&gt;<\/pre>\n<p>\u5728 css \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6837\u5f0f\uff1a<\/p>\n<pre>.test {\n    \/* ... *\/\n    display: inline;\n}<\/pre>\n<p>\u8fd9\u6837\uff0c\u5f53 &lt;p&gt; \u5143\u7d20\u88ab\u60ac\u505c\u65f6\uff0c\u6bcf\u4e00\u884c\u90fd\u4f1a\u51fa\u73b0\u4e0b\u5212\u7ebf\u3002<\/p>\n<p>\u5b8c\u6574\u7684\u4fee\u6539\u540e\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<pre>&lt;!doctype html&gt;\n&lt;html lang=\"en\"&gt;\n\n&lt;head&gt;\n    &lt;meta charset=\"utf-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\n    &lt;title&gt;Html Template&lt;\/title&gt;\n&lt;\/head&gt;\n\n&lt;body class=\"dark\"&gt;\n    &lt;style&gt;\n        .box-3 {\n            display: inline-block;\n            padding: 3rem;\n            border: 3px solid red;\n        }\n\n        .box-3&gt;p {\n            position: relative;\n        }\n\n        .box-3&gt;p:after {\n            content: '';\n            width: 0;\n            height: 3px;\n            position: absolute;\n            top: 100%;\n            left: 0;\n            transition: all .5s;\n            background: green;\n        }\n\n        .box-3:hover&gt;p:after {\n            width: 100%;\n        }\n\n        .test {\n            \/* \u6682\u65e0\u5185\u8054\u6837\u5f0f *\/\n            display: inline;\n        }\n\n        .test:hover {\n            background: linear-gradient(270deg, #00000036, #00ff53cf) 0 0;\n            background: linear-gradient(270deg, #00ff53cf, #00ff53cf) 0 0;\n            background-size: 100% 2px;\n            background-repeat: no-repeat;\n            background-position: 0% 100%;\n        }\n    &lt;\/style&gt;\n    &lt;main&gt;\n        &lt;div class=\"container py-5\"&gt;\n            &lt;div class=\"box-3\"&gt;\n                &lt;p class=\"test\"&gt;\n                    \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c\n                    ...\n                &lt;\/p&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/main&gt;\n&lt;\/body&gt;\n\n&lt;\/html&gt;<\/pre>\n<p>\u672c\u7bc7\u5173\u4e8e\u300a\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   TypeScript\u51fd\u6570\u4f53\u4e2d\u5982\u4f55\u9ad8\u6548\u5224\u65ad\u53c2\u6570\u7c7b\u578b\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f \u5c0f\u4f19\u4f34\u4eec\u5bf9\u6587\u7ae0\u7f16\u7a0b\u611f\u5174\u8da3\u5417\uff1f\u662f\u5426\u6b63\u5728\u5b66\u4e60\u76f8\u5173\u77e5\u8bc6\u70b9\uff1f\u5982\u679c\u662f\uff0c\u90a3\u4e48\u672c\u6587\u300a\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\u300b\uff0c\u5c31\u5f88\u9002\u5408\u4f60\uff0c\u672c\u7bc7\u6587\u7ae0\u8bb2\u89e3\u7684\u77e5\u8bc6\u70b9\u4e3b\u8981\u5305\u62ec\u3002\u5728\u4e4b\u540e\u7684\u6587\u7ae0\u4e2d\u4e5f\u4f1a\u591a\u591a\u5206\u4eab\u76f8\u5173\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff01 \u591a\u884c\u6587\u672c\u60ac\u505c\u6548\u679c\u4e0b\u5212\u7ebf \u6587\u672c\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\u4ec5\u9650\u4e00\u884c\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u5728 css \u4e2d\u4f7f\u7528 inline \u5c5e\u6027\uff0c\u5c06 p \u5143\u7d20\u8bbe\u7f6e\u4e3a\u5185\u8054\u5143\u7d20\uff0c\u4ece\u800c\u5b9e\u73b0\u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\u3002 \u4ee5\u4e0b\u662f\u5982\u4f55\u4fee\u6539\u4ee3\u7801\uff1a \u5728 &lt;p&gt; \u5143\u7d20\u4e2d\u6dfb\u52a0 class=&#8221;test&#8221; \u5c5e\u6027\uff1a &lt;p class=&#8221;test&#8221;&gt; \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c \u8fd9\u662f\u4e00\u6bb5\u6d4b\u8bd5\u6587\u672c &#8230; &lt;\/p&gt; \u5728 css \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6837\u5f0f\uff1a .test { \/* &#8230; *\/ display: inline; } \u8fd9\u6837\uff0c\u5f53 &lt;p&gt; \u5143\u7d20\u88ab\u60ac\u505c\u65f6\uff0c\u6bcf\u4e00\u884c\u90fd\u4f1a\u51fa\u73b0\u4e0b\u5212\u7ebf\u3002 \u5b8c\u6574\u7684\u4fee\u6539\u540e\u4ee3\u7801\u793a\u4f8b\uff1a &lt;!doctype html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;meta charset=&#8221;utf-8&#8243;&gt; &lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, initial-scale=1&#8243;&gt; &lt;title&gt;Html Template&lt;\/title&gt; [&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-52253","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52253","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=52253"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52253\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}