This commit is contained in:
Vaica committed 2026-06-22 17:15:55 +08:00
1 parent ad65bfbb4c
commit 0cc176e867
3 files changed
+233 -72

No files matched your search

+122 -40
View File
@@ -5708,62 +5708,157 @@ a.link-card:hover .link-card-arrow {
color: var(--accent, #3b82f6) !important;
}
/* ==================== 视频样式 ==================== */
/* ==================== 视频样式(简约风格) ==================== */
.post-video-wrapper {
.video-wrap {
margin: 1.5rem 0;
}
.video-player {
position: relative;
width: 100%;
border-radius: 12px;
overflow: hidden;
background: #000;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
cursor: pointer;
margin: 0;
}
[data-theme="dark"] .post-video-wrapper {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.video-container {
position: relative;
width: 100%;
max-width: 100%;
}
.video-container video {
.video-player video {
display: block;
width: 100%;
height: auto;
max-height: 80vh;
border-radius: 12px;
outline: none;
object-fit: contain;
}
.video-container video::-webkit-media-controls-panel {
background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
.video-play-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 56px;
height: 56px;
background: rgba(0, 0, 0, 0.5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
transition: opacity 0.3s, transform 0.3s;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
.video-play-icon svg {
width: 28px;
height: 28px;
margin-left: 3px;
}
.video-player.playing .video-play-icon {
opacity: 0;
transform: translate(-50%, -50%) scale(0.8);
pointer-events: none;
}
.video-player:hover .video-play-icon {
transform: translate(-50%, -50%) scale(1.08);
}
.video-controls {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
opacity: 0;
transition: opacity 0.3s;
}
.video-player:hover .video-controls,
.video-player.playing .video-controls {
opacity: 1;
}
.video-ctrl-btn {
background: none;
border: none;
color: #fff;
font-size: 18px;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
opacity: 0.85;
transition: opacity 0.2s;
}
.video-ctrl-btn:hover {
opacity: 1;
}
.video-ctrl-btn svg {
width: 20px;
height: 20px;
}
.video-progress {
flex: 1;
height: 4px;
background: rgba(255, 255, 255, 0.3);
border-radius: 2px;
cursor: pointer;
position: relative;
}
.video-progress-bar {
height: 100%;
background: #fff;
border-radius: 2px;
width: 0;
transition: width 0.1s linear;
}
.video-time {
color: #fff;
font-size: 12px;
flex-shrink: 0;
min-width: 36px;
text-align: center;
font-variant-numeric: tabular-nums;
}
.video-caption {
padding: 0.75rem 1rem;
padding: 0.6rem 0;
text-align: center;
font-size: 0.85rem;
color: #6b7280;
background: #f9fafb;
border-top: 1px solid #e5e7eb;
font-size: 0.82rem;
color: #9ca3af;
}
[data-theme="dark"] .video-player {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .video-caption {
color: #9ca3af;
background: #1f2937;
border-top-color: #374151;
color: #6b7280;
}
/* Bilibili / YouTube 嵌入 */
.video-embed {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 */
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
border-radius: 12px;
background: #000;
}
.video-embed iframe {
@@ -5775,16 +5870,3 @@ a.link-card:hover .link-card-arrow {
border: none;
border-radius: 12px;
}
/* 文章内直接写 <video> 标签的样式 */
.post-content video {
display: block;
max-width: 100%;
margin: 1.5rem auto;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .post-content video {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}