From 36199371d444aa68511302f8f98e5774b6e7776a Mon Sep 17 00:00:00 2001 From: Yep_Q Date: Sun, 5 Oct 2025 04:59:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3CSS=20nth-child?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=99=A8=E5=81=8F=E7=A7=BB=E4=BB=A5=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=AE=9E=E9=99=85HTML=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 详细说明: - 修复从'材质与效果呈现'开始背景变黑的问题 - 根本原因: Hero section是第一个section元素(nth-child(1)) - 将所有.section:nth-child选择器从1-5调整为2-6 - 修改文件: css/styles.css (行287-376) - 影响: 浅色主题和深色主题的所有区块背景图片 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../order-classes/civil/css/styles.css | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web_frontend/web_result/order-classes/civil/css/styles.css b/web_frontend/web_result/order-classes/civil/css/styles.css index 32fd012c..92b13e65 100644 --- a/web_frontend/web_result/order-classes/civil/css/styles.css +++ b/web_frontend/web_result/order-classes/civil/css/styles.css @@ -284,7 +284,7 @@ body.dark-theme .hero { } /* 浅色图片背景 - 每个区块使用不同图片 */ -.section:nth-child(1) { +.section:nth-child(2) { background-image: linear-gradient(to bottom, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 1) 100%), url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?w=1920&q=80'); @@ -293,7 +293,7 @@ body.dark-theme .hero { background-attachment: fixed; } -.section:nth-child(2) { +.section:nth-child(3) { background-image: linear-gradient(to bottom, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 1) 100%), url('https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?w=1920&q=80'); @@ -302,7 +302,7 @@ body.dark-theme .hero { background-attachment: fixed; } -.section:nth-child(3) { +.section:nth-child(4) { background-image: linear-gradient(to bottom, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 1) 100%), url('https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1920&q=80'); @@ -311,7 +311,7 @@ body.dark-theme .hero { background-attachment: fixed; } -.section:nth-child(4) { +.section:nth-child(5) { background-image: linear-gradient(to bottom, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 1) 100%), url('https://images.unsplash.com/photo-1600607687644-c7171b42498f?w=1920&q=80'); @@ -320,7 +320,7 @@ body.dark-theme .hero { background-attachment: fixed; } -.section:nth-child(5) { +.section:nth-child(6) { background-image: linear-gradient(to bottom, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 1) 100%), url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?w=1920&q=80'); @@ -330,7 +330,7 @@ body.dark-theme .hero { } /* 深色主题下的区块背景 */ -body.dark-theme .section:nth-child(1) { +body.dark-theme .section:nth-child(2) { background-image: linear-gradient(to bottom, rgba(120, 53, 15, 0.92) 0%, rgba(161, 98, 7, 0.88) 100%), url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?w=1920&q=80'); @@ -339,7 +339,7 @@ body.dark-theme .section:nth-child(1) { background-attachment: fixed; } -body.dark-theme .section:nth-child(2) { +body.dark-theme .section:nth-child(3) { background-image: linear-gradient(to bottom, rgba(161, 98, 7, 0.90) 0%, rgba(120, 53, 15, 0.88) 100%), url('https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?w=1920&q=80'); @@ -348,7 +348,7 @@ body.dark-theme .section:nth-child(2) { background-attachment: fixed; } -body.dark-theme .section:nth-child(3) { +body.dark-theme .section:nth-child(4) { background-image: linear-gradient(to bottom, rgba(120, 53, 15, 0.92) 0%, rgba(161, 98, 7, 0.88) 100%), url('https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1920&q=80'); @@ -357,7 +357,7 @@ body.dark-theme .section:nth-child(3) { background-attachment: fixed; } -body.dark-theme .section:nth-child(4) { +body.dark-theme .section:nth-child(5) { background-image: linear-gradient(to bottom, rgba(161, 98, 7, 0.90) 0%, rgba(120, 53, 15, 0.88) 100%), url('https://images.unsplash.com/photo-1600607687644-c7171b42498f?w=1920&q=80'); @@ -366,7 +366,7 @@ body.dark-theme .section:nth-child(4) { background-attachment: fixed; } -body.dark-theme .section:nth-child(5) { +body.dark-theme .section:nth-child(6) { background-image: linear-gradient(to bottom, rgba(161, 98, 7, 0.90) 0%, rgba(120, 53, 15, 0.88) 100%), url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?w=1920&q=80');