{"id":872,"date":"2025-12-22T09:46:20","date_gmt":"2025-12-22T01:46:20","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=872"},"modified":"2025-12-22T09:46:20","modified_gmt":"2025-12-22T01:46:20","slug":"%e5%9c%a3%e8%af%9e%e8%8a%82%e5%88%b6%e4%bd%9c%e4%b8%80%e9%a2%97html%e7%9a%84%e5%9c%a3%e8%af%9e%e6%a0%91-2","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/22\/%e5%9c%a3%e8%af%9e%e8%8a%82%e5%88%b6%e4%bd%9c%e4%b8%80%e9%a2%97html%e7%9a%84%e5%9c%a3%e8%af%9e%e6%a0%91-2\/","title":{"rendered":"\u5723\u8bde\u8282\u5236\u4f5c\u4e00\u9897HTML\u7684\u5723\u8bde\u6811"},"content":{"rendered":"\n<p>\u5723\u8bde\u8282\u5feb\u4e50\uff01<img decoding=\"async\" alt=\"\ud83c\udf84\" src=\"https:\/\/abs-0.twimg.com\/emoji\/v2\/svg\/1f384.svg\">\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u53c8\u6f02\u4eae\u7684\u7eaf HTML + CSS \u5b9e\u73b0\u7684\u5723\u8bde\u6811\uff0c\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u4fdd\u5b58\u4e3a .html \u6587\u4ef6\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u3002\u6811\u4e0a\u6709\u95ea\u70c1\u7684\u5f69\u706f\u3001\u661f\u661f\u3001\u96ea\u82b1\u98d8\u843d\u6548\u679c\uff0c\u9002\u5408\u8282\u65e5\u6c1b\u56f4\u3002<\/p>\n\n\n\n<p>html<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;!DOCTYPE html&gt;\n&amp;lt;html lang=&quot;zh-CN&quot;&gt;\n&amp;lt;head&gt;\n  &amp;lt;meta charset=&quot;UTF-8&quot; \/&gt;\n  &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;\/&gt;\n  &amp;lt;title&gt;\u5723\u8bde\u6811 \ud83c\udf84 Merry Christmas!&amp;lt;\/title&gt;\n  &amp;lt;style&gt;\n    body {\n      margin: 0;\n      height: 100vh;\n      background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);\n      overflow: hidden;\n      font-family: Arial, Helvetica, sans-serif;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      color: white;\n    }\n\n    .tree-container {\n      position: relative;\n      width: 400px;\n      height: 600px;\n      perspective: 1000px;\n    }\n\n    \/* \u6811\u5e72 *\/\n    .trunk {\n      position: absolute;\n      bottom: 0;\n      left: 50%;\n      transform: translateX(-50%);\n      width: 60px;\n      height: 120px;\n      background: linear-gradient(#5d4037, #3e2723);\n      border-radius: 10px;\n      z-index: 2;\n    }\n\n    \/* \u6811\u8eab\uff08\u4e09\u5c42\uff09 *\/\n    .layer {\n      position: absolute;\n      left: 50%;\n      transform: translateX(-50%);\n      background: linear-gradient(135deg, #1b5e20, #2e7d32, #4caf50);\n      border-radius: 50% 50% 0 0;\n      box-shadow: 0 10px 30px rgba(0,0,0,0.5);\n      z-index: 1;\n    }\n\n    .layer1 { width: 280px; height: 180px; bottom: 100px; }\n    .layer2 { width: 240px; height: 160px; bottom: 220px; }\n    .layer3 { width: 200px; height: 140px; bottom: 340px; }\n\n    \/* \u6811\u9876\u661f\u661f *\/\n    .star {\n      position: absolute;\n      top: 0;\n      left: 50%;\n      transform: translateX(-50%);\n      width: 0;\n      height: 0;\n      border-left: 30px solid transparent;\n      border-right: 30px solid transparent;\n      border-bottom: 50px solid #ffeb3b;\n      animation: twinkle 2s infinite alternate;\n      z-index: 3;\n      filter: drop-shadow(0 0 10px #ffeb3b);\n    }\n\n    .star::before {\n      content: &#039;&#039;;\n      position: absolute;\n      top: 10px;\n      left: -20px;\n      width: 0;\n      height: 0;\n      border-left: 20px solid transparent;\n      border-right: 20px solid transparent;\n      border-bottom: 35px solid #ffeb3b;\n      transform: rotate(36deg);\n    }\n\n    .star::after {\n      content: &#039;&#039;;\n      position: absolute;\n      top: 10px;\n      left: -20px;\n      width: 0;\n      height: 0;\n      border-left: 20px solid transparent;\n      border-right: 20px solid transparent;\n      border-bottom: 35px solid #ffeb3b;\n      transform: rotate(-36deg);\n    }\n\n    \/* \u5f69\u706f *\/\n    .light {\n      position: absolute;\n      width: 18px;\n      height: 18px;\n      border-radius: 50%;\n      box-shadow: 0 0 15px currentColor;\n      animation: blink 3s infinite;\n    }\n\n    .light:nth-child(1) { background: #ff1744; top: 30px; left: 30%; animation-delay: 0s; }\n    .light:nth-child(2) { background: #ffd600; top: 60px; left: 70%; animation-delay: 0.5s; }\n    .light:nth-child(3) { background: #00e676; top: 120px; left: 20%; animation-delay: 1s; }\n    .light:nth-child(4) { background: #2979ff; top: 180px; left: 80%; animation-delay: 1.5s; }\n    .light:nth-child(5) { background: #ff6d00; top: 240px; left: 25%; animation-delay: 2s; }\n    .light:nth-child(6) { background: #e91e63; top: 300px; left: 75%; animation-delay: 2.5s; }\n\n    \/* \u96ea\u82b1\u98d8\u843d *\/\n    @keyframes snowfall {\n      0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }\n      100% { transform: translateY(800px) rotate(720deg); opacity: 0; }\n    }\n\n    .snowflake {\n      position: absolute;\n      width: 10px;\n      height: 10px;\n      background: white;\n      border-radius: 50%;\n      opacity: 0.8;\n      animation: snowfall 10s linear infinite;\n    }\n\n    .snowflake:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }\n    .snowflake:nth-child(2) { left: 30%; animation-delay: 2s; animation-duration: 15s; }\n    .snowflake:nth-child(3) { left: 50%; animation-delay: 4s; animation-duration: 10s; }\n    .snowflake:nth-child(4) { left: 70%; animation-delay: 6s; animation-duration: 13s; }\n    .snowflake:nth-child(5) { left: 90%; animation-delay: 8s; animation-duration: 11s; }\n\n    \/* \u52a8\u753b *\/\n    @keyframes twinkle {\n      0% { transform: scale(1) rotate(0deg); }\n      100% { transform: scale(1.2) rotate(10deg); }\n    }\n\n    @keyframes blink {\n      0%, 100% { opacity: 1; box-shadow: 0 0 20px currentColor; }\n      50% { opacity: 0.6; box-shadow: 0 0 10px currentColor; }\n    }\n\n    h1 {\n      position: absolute;\n      bottom: 40px;\n      left: 50%;\n      transform: translateX(-50%);\n      font-size: 2.2rem;\n      color: #fff;\n      text-shadow: 0 0 20px #ffeb3b;\n      z-index: 10;\n      white-space: nowrap;\n    }\n  &amp;lt;\/style&gt;\n&amp;lt;\/head&gt;\n&amp;lt;body&gt;\n  &amp;lt;div class=&quot;tree-container&quot;&gt;\n    &amp;lt;div class=&quot;star&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;layer layer1&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;layer layer2&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;layer layer3&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;trunk&quot;&gt;&amp;lt;\/div&gt;\n\n    &amp;lt;!-- \u5f69\u706f --&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;light&quot;&gt;&amp;lt;\/div&gt;\n\n    &amp;lt;!-- \u96ea\u82b1 --&gt;\n    &amp;lt;div class=&quot;snowflake&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;snowflake&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;snowflake&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;snowflake&quot;&gt;&amp;lt;\/div&gt;\n    &amp;lt;div class=&quot;snowflake&quot;&gt;&amp;lt;\/div&gt;\n\n    &amp;lt;h1&gt;Merry Christmas! \ud83c\udf85&amp;lt;\/h1&gt;\n  &amp;lt;\/div&gt;\n&amp;lt;\/body&gt;\n&amp;lt;\/html&gt;\n<\/pre><\/div>\n\n\n<p>\u6548\u679c\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e09\u5c42\u7eff\u8272\u5723\u8bde\u6811<\/li>\n\n\n\n<li>\u9ec4\u8272\u95ea\u70c1\u661f\u661f\u9876\u7aef<\/li>\n\n\n\n<li>\u968f\u673a\u95ea\u70c1\u7684\u5f69\u706f\uff08\u7ea2\u9ec4\u7eff\u84dd\u6a59\u7c89\uff09<\/li>\n\n\n\n<li>\u80cc\u666f\u6df1\u84dd\u6e10\u53d8 + \u98d8\u843d\u7684\u767d\u8272\u96ea\u82b1<\/li>\n\n\n\n<li>\u6587\u5b57\u201cMerry Christmas!\u201d\u5e26\u53d1\u5149\u6548\u679c<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5723\u8bde\u8282\u5feb\u4e50\uff01\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u53c8\u6f02\u4eae\u7684\u7eaf HTML + CSS \u5b9e\u73b0\u7684\u5723\u8bde\u6811\uff0c\u53ef\u4ee5\u76f4&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/22\/%e5%9c%a3%e8%af%9e%e8%8a%82%e5%88%b6%e4%bd%9c%e4%b8%80%e9%a2%97html%e7%9a%84%e5%9c%a3%e8%af%9e%e6%a0%91-2\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-872","post","type-post","status-publish","format-standard","hentry","category-12"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=872"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/872\/revisions"}],"predecessor-version":[{"id":873,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/872\/revisions\/873"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}