星辰大海动态标题样式

星辰_深色
@keyframeskeyframes starPulse {
0%, 100% { opacity: 1; box-shadow: 0 0 6px 2px rgba(160, 200, 255, 0.9); }
50% { opacity: 0.3; box-shadow: 0 0 2px 1px rgba(160, 200, 255, 0.@keyframes); }
}
@keyframes orbitSpin {
from { transform: rotate(0deg); }
to { transform: rot@keyframeste(360deg); }
}
@keyframes scanLine {
from { width: 0; opacity: 0.8; }
to { wid@keyframesh: 100%; opacity: 0; }
}
@keyframes breathe {
0%, 100% { transform: scale(1); opacity: 0.7; }
50% { transform: scale(1.6); opacity: 1; }
}
/\* ── H1 · 银芒主星 ── \*/
.markdown-preview-view h1,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1 {
font-size: 2em;
font-weight: 700;
letter-spacing: 0.05em;
color: #e8f0ff;
text-shadow:
0 0 16px rgba(140, 180, 255, 0.7),
0 0 40px rgba(100, 140, 255, 0.3);
position: relative;
padding-left: 1.4em;
padding-bottom: 0.15em;
}
/\* 星核 · 闪烁 \*/
.markdown-preview-view h1::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::before {
content: '';
position: absolute;
left: 0.1em;
top: 50%;
transform: translateY(-50%);
width: 9px;
height: 9px;
border-radius: 50%;
background: #c8dcff;
box-shadow: 0 0 6px 2px rgba(160, 200, 255, 0.9);
animation: starPulse 2s ease-in-out infinite;
}
/\* 拖尾光弧 · 底部横线渐隐 \*/
.markdown-preview-view h1::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::after {
content: '';
position: absolute;
left: 1.4em;
bottom: 0;
width: 60%;
height: 1px;
background: linear-gradient(90deg, rgba(160,200,255,0.6) 0%, transparent 100%);
}
/\* ── H2 · 旋转菱形 ── \*/
.markdown-preview-view h2,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2 {
font-size: 1.45em;
font-weight: 600;
color: #a8c4f0;
border-left: 2px solid rgba(140, 180, 255, 0.5);
padding-left: 0.9em;
position: relative;
}
.markdown-preview-view h2::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2::before {
content: '◆';
position: absolute;
left: -0.65em;
top: 50%;
transform: translateY(-50%) rotate(0deg);
font-size: 0.55em;
color: rgba(140, 180, 255, 0.8);
animation: orbitSpin 6s linear infinite;
transform-origin: center center;
line-height: 1;
}
/\* ── H3 · 扫描线入场 ── \*/
.markdown-preview-view h3,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3 {
font-size: 1.2em;
font-weight: 500;
color: #8aacd8;
border-left: 2px dashed rgba(120, 160, 220, 0.4);
padding-left: 0.7em;
position: relative;
overflow: hidden;
}
.markdown-preview-view h3::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
height: 1px;
background: rgba(140, 180, 255, 0.55);
animation: scanLine 2.4s ease-out infinite;
}
/\* ── H4 · 呼吸光点 ── \*/
.markdown-preview-view h4,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4 {
font-size: 1.05em;
font-weight: 500;
color: #6b8fbc;
padding-left: 1.2em;
position: relative;
}
.markdown-preview-view h4::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4::before {
content: '';
position: absolute;
left: 0.15em;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
background: rgba(120, 160, 210, 0.75);
animation: breathe 2.8s ease-in-out infinite;
}
/\* ── H5 · 静态三角指引 ── \*/
.markdown-preview-view h5,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5 {
font-size: 0.95em;
font-weight: 400;
color: #546d8f;
padding-left: 1.3em;
letter-spacing: 0.03em;
position: relative;
}
.markdown-preview-view h5::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5::before {
content: '▸';
position: absolute;
left: 0.1em;
color: rgba(100, 140, 190, 0.5);
font-size: 0.8em;
}
/\* ── H6 · 虚空细语 ── \*/
.markdown-preview-view h6,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6 {
font-size: 0.88em;
font-weight: 400;
color: #3d5270;
padding-left: 1.6em;
font-style: italic;
letter-spacing: 0.02em;
position: relative;
}
.markdown-preview-view h6::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6::before {
content: '· ·';
position: absolute;
left: 0.2em;
color: rgba(80, 110, 160, 0.4);
font-style: normal;
letter-spacing: 0.1em;
font-size: 0.9em;
}
大海_浅色
@keyframes waveFlowLight {
0% { background-position: 0 0; }
100% { background-position: 40px 0; }
}
@keyframes tideRiseLight {
0%, 100% { transform: scaleX(1); opacity: 1; }
50% { transform: scaleX(1.08); opacity: 0.55; }
}
@keyframes rippleLight {
0% { transform: translateY(-50%) scale(0.6); opacity: 0.8; }
100% { transform: translateY(-50%) scale(2.2); opacity: 0; }
}
@keyframes driftLight {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(6px); }
}
/* H1 · 浪纹底边推进 */
.markdown-preview-view h1,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1 {
font-size: 2em;
font-weight: 800;
color: #0c2c4d;
letter-spacing: -0.01em;
position: relative;
padding-bottom: 0.4em;
}
.markdown-preview-view h1::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::after {
content: '';
position: absolute;
left: 0; bottom: 0;
width: 100%; height: 4px;
background: repeating-linear-gradient(90deg,
#2a6ab5 0px, #2a6ab5 14px, transparent 14px, transparent 22px);
animation: waveFlowLight 1.6s linear infinite;
}
/* H2 · 潮汐竖线起伏 */
.markdown-preview-view h2,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2 {
font-size: 1.45em;
font-weight: 700;
color: #1c4a82;
position: relative;
padding-left: 0.9em;
}
.markdown-preview-view h2::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2::before {
content: '';
position: absolute;
left: 0; top: 8%;
width: 3px; height: 84%;
background: #2a6ab5;
transform-origin: center;
animation: tideRiseLight 2.6s ease-in-out infinite;
}
/* H3 · 水波扩散圈 */
.markdown-preview-view h3,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3 {
font-size: 1.2em;
font-weight: 600;
color: #2e63a0;
position: relative;
padding-left: 1em;
}
.markdown-preview-view h3::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3::before {
content: '';
position: absolute;
left: 0.1em; top: 50%;
width: 6px; height: 6px;
border-radius: 50%;
border: 1px solid #3a7dc4;
animation: rippleLight 1.8s ease-out infinite;
}
/* H4 · 漂浮波浪符 */
.markdown-preview-view h4,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4 {
font-size: 1.05em;
font-weight: 600;
color: #3c75b0;
position: relative;
padding-left: 1.2em;
}
.markdown-preview-view h4::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4::before {
content: '〜';
position: absolute;
left: 0; top: 0;
color: #4783b8;
display: inline-block;
animation: driftLight 2.4s ease-in-out infinite;
}
/* H5 · 静态短浪 */
.markdown-preview-view h5,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5 {
font-size: 0.95em;
font-weight: 400;
color: #5d8cbb;
padding-left: 1.3em;
position: relative;
}
.markdown-preview-view h5::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5::before {
content: '';
position: absolute;
left: 0; top: 50%;
transform: translateY(-50%);
width: 10px; height: 1px;
background: rgba(58, 125, 196, 0.7);
}
/* H6 · 浅水细语 */
.markdown-preview-view h6,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6 {
font-size: 0.88em;
font-weight: 400;
color: #7ba2c9;
font-style: italic;
padding-left: 1.5em;
position: relative;
}
.markdown-preview-view h6::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6::before {
content: '··';
position: absolute;
left: 0.2em;
color: rgba(58, 125, 196, 0.5);
font-style: normal;
letter-spacing: 0.15em;
}
合并版, 自动切换
/* =============================================
星辰大海 · H1–H6 标题样式
深色 → 星辰组(寒星/银芒)
浅色 → 大海组(浪纹/波光)
自动适配 Obsidian 深浅主题
============================================= */
/* ── 共用关键帧 ── */
@keyframes starPulse {
0%, 100% { opacity: 1; box-shadow: 0 0 6px 2px rgba(160, 200, 255, 0.9); }
50% { opacity: 0.3; box-shadow: 0 0 2px 1px rgba(160, 200, 255, 0.2); }
}
@keyframes orbitSpin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes scanLine {
from { width: 0; opacity: 0.8; }
to { width: 100%; opacity: 0; }
}
@keyframes breathe {
0%, 100% { transform: scale(1); opacity: 0.7; }
50% { transform: scale(1.6); opacity: 1; }
}
@keyframes waveFlowLight {
0% { background-position: 0 0; }
100% { background-position: 40px 0; }
}
@keyframes tideRiseLight {
0%, 100% { transform: scaleX(1); opacity: 1; }
50% { transform: scaleX(1.08); opacity: 0.55; }
}
@keyframes rippleLight {
0% { transform: translateY(-50%) scale(0.6); opacity: 0.8; }
100% { transform: translateY(-50%) scale(2.2); opacity: 0; }
}
@keyframes driftLight {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(6px); }
}
/* =============================================
深色主题 · 星辰组
============================================= */
.theme-dark {
/* H1 · 银芒主星 */
.markdown-preview-view h1,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1 {
font-size: 2em;
font-weight: 700;
letter-spacing: 0.05em;
color: #e8f0ff;
text-shadow:
0 0 16px rgba(140, 180, 255, 0.7),
0 0 40px rgba(100, 140, 255, 0.3);
position: relative;
padding-left: 1.4em;
padding-bottom: 0.15em;
}
.markdown-preview-view h1::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::before {
content: '';
position: absolute;
left: 0.1em;
top: 50%;
transform: translateY(-50%);
width: 9px;
height: 9px;
border-radius: 50%;
background: #c8dcff;
box-shadow: 0 0 6px 2px rgba(160, 200, 255, 0.9);
animation: starPulse 2s ease-in-out infinite;
}
.markdown-preview-view h1::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::after {
content: '';
position: absolute;
left: 1.4em;
bottom: 0;
width: 60%;
height: 1px;
background: linear-gradient(90deg, rgba(160,200,255,0.6) 0%, transparent 100%);
}
/* H2 · 旋转菱形 */
.markdown-preview-view h2,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2 {
font-size: 1.45em;
font-weight: 600;
color: #a8c4f0;
border-left: 2px solid rgba(140, 180, 255, 0.5);
padding-left: 0.9em;
position: relative;
}
.markdown-preview-view h2::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2::before {
content: '◆';
position: absolute;
left: -0.65em;
top: 50%;
transform: translateY(-50%) rotate(0deg);
font-size: 0.55em;
color: rgba(140, 180, 255, 0.8);
animation: orbitSpin 6s linear infinite;
transform-origin: center center;
line-height: 1;
}
/* H3 · 扫描线入场 */
.markdown-preview-view h3,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3 {
font-size: 1.2em;
font-weight: 500;
color: #8aacd8;
border-left: 2px dashed rgba(120, 160, 220, 0.4);
padding-left: 0.7em;
position: relative;
overflow: hidden;
}
.markdown-preview-view h3::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
height: 1px;
background: rgba(140, 180, 255, 0.55);
animation: scanLine 2.4s ease-out infinite;
}
/* H4 · 呼吸光点 */
.markdown-preview-view h4,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4 {
font-size: 1.05em;
font-weight: 500;
color: #6b8fbc;
padding-left: 1.2em;
position: relative;
}
.markdown-preview-view h4::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4::before {
content: '';
position: absolute;
left: 0.15em;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
background: rgba(120, 160, 210, 0.75);
animation: breathe 2.8s ease-in-out infinite;
}
/* H5 · 静态三角指引 */
.markdown-preview-view h5,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5 {
font-size: 0.95em;
font-weight: 400;
color: #546d8f;
padding-left: 1.3em;
letter-spacing: 0.03em;
position: relative;
}
.markdown-preview-view h5::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5::before {
content: '▸';
position: absolute;
left: 0.1em;
color: rgba(100, 140, 190, 0.5);
font-size: 0.8em;
}
/* H6 · 虚空细语 */
.markdown-preview-view h6,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6 {
font-size: 0.88em;
font-weight: 400;
color: #3d5270;
padding-left: 1.6em;
font-style: italic;
letter-spacing: 0.02em;
position: relative;
}
.markdown-preview-view h6::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6::before {
content: '· ·';
position: absolute;
left: 0.2em;
color: rgba(80, 110, 160, 0.4);
font-style: normal;
letter-spacing: 0.1em;
font-size: 0.9em;
}
} /* .theme-dark */
/* =============================================
浅色主题 · 大海组
============================================= */
.theme-light {
/* H1 · 浪纹底边推进 */
.markdown-preview-view h1,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1 {
font-size: 2em;
font-weight: 800;
color: #0c2c4d;
letter-spacing: -0.01em;
position: relative;
padding-bottom: 0.4em;
}
.markdown-preview-view h1::after,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1 .cm-header-1::after {
content: '';
position: absolute;
left: 0; bottom: 0;
width: 100%; height: 4px;
background: repeating-linear-gradient(90deg,
#2a6ab5 0px, #2a6ab5 14px, transparent 14px, transparent 22px);
animation: waveFlowLight 1.6s linear infinite;
}
/* H2 · 潮汐竖线起伏 */
.markdown-preview-view h2,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2 {
font-size: 1.45em;
font-weight: 700;
color: #1c4a82;
position: relative;
padding-left: 0.9em;
}
.markdown-preview-view h2::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 .cm-header-2::before {
content: '';
position: absolute;
left: 0; top: 8%;
width: 3px; height: 84%;
background: #2a6ab5;
transform-origin: center;
animation: tideRiseLight 2.6s ease-in-out infinite;
}
/* H3 · 水波扩散圈 */
.markdown-preview-view h3,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3 {
font-size: 1.2em;
font-weight: 600;
color: #2e63a0;
position: relative;
padding-left: 1em;
}
.markdown-preview-view h3::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3 .cm-header-3::before {
content: '';
position: absolute;
left: 0.1em; top: 50%;
width: 6px; height: 6px;
border-radius: 50%;
border: 1px solid #3a7dc4;
animation: rippleLight 1.8s ease-out infinite;
}
/* H4 · 漂浮波浪符 */
.markdown-preview-view h4,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4 {
font-size: 1.05em;
font-weight: 600;
color: #3c75b0;
position: relative;
padding-left: 1.2em;
}
.markdown-preview-view h4::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4 .cm-header-4::before {
content: '〜';
position: absolute;
left: 0; top: 0;
color: #4783b8;
display: inline-block;
animation: driftLight 2.4s ease-in-out infinite;
}
/* H5 · 静态短浪 */
.markdown-preview-view h5,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5 {
font-size: 0.95em;
font-weight: 400;
color: #5d8cbb;
padding-left: 1.3em;
position: relative;
}
.markdown-preview-view h5::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5 .cm-header-5::before {
content: '';
position: absolute;
left: 0; top: 50%;
transform: translateY(-50%);
width: 10px; height: 1px;
background: rgba(58, 125, 196, 0.7);
}
/* H6 · 浅水细语 */
.markdown-preview-view h6,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6 {
font-size: 0.88em;
font-weight: 400;
color: #7ba2c9;
font-style: italic;
padding-left: 1.5em;
position: relative;
}
.markdown-preview-view h6::before,
.markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 .cm-header-6::before {
content: '··';
position: absolute;
left: 0.2em;
color: rgba(58, 125, 196, 0.5);
font-style: normal;
letter-spacing: 0.15em;
}
} /* .theme-light */