fix: 修正CSS nth-child选择器偏移以匹配实际HTML结构
详细说明: - 修复从'材质与效果呈现'开始背景变黑的问题 - 根本原因: 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user