feat: story-journey immersive layer (progress, scene focus, floating orbs)
All checks were successful
Deploy / deploy (push) Successful in 2s
All checks were successful
Deploy / deploy (push) Successful in 2s
This commit is contained in:
@@ -253,6 +253,121 @@ main {
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
/* ═══ 故事沉浸层(文章页) ═══ */
|
||||
.story-journey {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.story-orb {
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
border-radius: 50%;
|
||||
filter: blur(36px);
|
||||
opacity: 0.35;
|
||||
mix-blend-mode: screen;
|
||||
transition: transform 0.2s ease-out;
|
||||
}
|
||||
|
||||
.orb-1 {
|
||||
width: 280px;
|
||||
height: 280px;
|
||||
top: 14%;
|
||||
left: -80px;
|
||||
background: radial-gradient(circle, rgba(123,104,238,0.42), transparent 70%);
|
||||
}
|
||||
|
||||
.orb-2 {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
top: 48%;
|
||||
right: -60px;
|
||||
background: radial-gradient(circle, rgba(34,211,238,0.34), transparent 72%);
|
||||
}
|
||||
|
||||
.orb-3 {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
bottom: 6%;
|
||||
left: 24%;
|
||||
background: radial-gradient(circle, rgba(74,144,217,0.30), transparent 72%);
|
||||
}
|
||||
|
||||
.story-progress {
|
||||
position: sticky;
|
||||
top: 62px;
|
||||
height: 4px;
|
||||
background: rgba(123,104,238,0.18);
|
||||
border-radius: 999px;
|
||||
overflow: hidden;
|
||||
margin: -1rem 0 2rem;
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.story-progress-bar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background: linear-gradient(90deg, var(--glow-purple), var(--glow-cyan));
|
||||
box-shadow: 0 0 18px rgba(123,104,238,0.6);
|
||||
transition: width 0.08s linear;
|
||||
}
|
||||
|
||||
/* 场景段落:像旅程节点 */
|
||||
.article-body > p {
|
||||
position: relative;
|
||||
padding-left: 1.1rem;
|
||||
}
|
||||
|
||||
.article-body > p::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -0.15rem;
|
||||
top: 0.85rem;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--glow-purple);
|
||||
box-shadow: 0 0 12px rgba(123,104,238,0.8);
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.article-body > p.active-scene::before {
|
||||
background: var(--glow-cyan);
|
||||
box-shadow: 0 0 16px rgba(34,211,238,0.9);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.article-body > p.active-scene {
|
||||
text-shadow: 0 0 18px rgba(123,104,238,0.22);
|
||||
}
|
||||
|
||||
/* 手机端沉浸优化 */
|
||||
@media (max-width: 640px) {
|
||||
.story-progress {
|
||||
top: 54px;
|
||||
margin: -0.5rem 0 1.2rem;
|
||||
}
|
||||
.story-orb {
|
||||
filter: blur(26px);
|
||||
opacity: 0.28;
|
||||
}
|
||||
.orb-1 { width: 180px; height: 180px; left: -60px; }
|
||||
.orb-2 { width: 150px; height: 150px; right: -45px; }
|
||||
.orb-3 { width: 190px; height: 190px; left: 20%; }
|
||||
}
|
||||
|
||||
/* 降级策略:用户偏好减少动画 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.story-orb,
|
||||
.story-progress-bar,
|
||||
.reveal,
|
||||
.js-ready .article-body p {
|
||||
animation: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══ 文章页 ═══ */
|
||||
.dream-article {
|
||||
padding-top: 2rem;
|
||||
|
||||
Reference in New Issue
Block a user