feat(video): improve video playback with cross-fade transition

Implement smooth transition between videos using CSS opacity animation
Add support for multiple video elements to enable seamless switching
This commit is contained in:
你的名字
2025-07-16 14:43:33 +08:00
parent c368680eaa
commit e3a776b381
3 changed files with 70 additions and 28 deletions

View File

@@ -11,11 +11,16 @@
<body>
<!-- 视频背景 -->
<video autoplay muted id="bg-video">
<!-- 初始可以留空,或放一个默认视频 -->
<source id="video-source" src="视频资源/3D 建模图片制作.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<div class="video-container">
<video autoplay muted class="bg-video active" id="video1">
<source src="视频资源/3D 建模图片制作.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<video muted class="bg-video" id="video2">
<source src="" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<!-- 内容层,覆盖在视频之上 -->
<div class="content-overlay">