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:
15
index.html
15
index.html
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user