{"id":25506,"date":"2024-11-24T09:14:47","date_gmt":"2024-11-24T01:14:47","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25506\/"},"modified":"2024-11-24T09:14:47","modified_gmt":"2024-11-24T01:14:47","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-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25506\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173062429728654.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  \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 <\/p>\n<p> \u5143\u7d20\u4e2d\u6dfb\u52a0 class=&#8221;test&#8221; \u5c5e\u6027\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/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> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728 css \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6837\u5f0f\uff1a<\/p>\n<pre>.test {\n    \/* ... *\/\n    display: inline;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u6837\uff0c\u5f53 <\/p>\n<p> \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> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5b9e\u73b0 HTML \u591a\u884c\u6587\u672c\u7684\u60ac\u505c\u4e0b\u5212\u7ebf\u6548\u679c\uff1f\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>\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 \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 \u5143\u7d20\u4e2d\u6dfb\u52a0 class=&#8221;test&#8221; \u5c5e\u6027\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b &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; \u767b\u5f55\u540e\u590d\u5236 \u5728 css \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6837\u5f0f\uff1a .test { \/* &#8230; *\/ display: inline; } \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u6837\uff0c\u5f53 \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; &lt;\/head&gt; &lt;body class=&#8221;dark&#8221;&gt; &lt;style&gt; .box-3 { [&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-25506","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25506","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=25506"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25506\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}