jquery - 背景视频不适用于移动横幅
问题描述
我使用 Jquery 插件 covervid.min.js 在横幅上添加背景视频,它在桌面上工作,但视频不在移动视图中播放。
<div class=bgvideo>
<div class="masthead">
<video class="masthead-video" preload autoplay loop muted poster="images/banner/paragliding.jpg">
<source src="images/aeros.mp4" type="video/mp4">
</video>
<div class="masthead-overlay"></div>
<div class=owl_text>
<div class=owl-carousel>
<div class=text1>
<h1>Explore the Exciting Landmarks of Malaysia</h1>
<p>Choose the Best Suitable for You & Your Family </p>
</div>
<div class=text2>
<h1>Venture into the Land of Islands, Sea, and Incredible Countryside</h1>
<p>Attractive and Exciting Rides at Affordable Price</p>
</div>
<div class=text3>
<h1>A True Adventure Paradise</h1>
<p>Lifetime Memory Flying Over the Natural Heritage</p>
</div>
</div>
</div>
</div>
</div>
coverVid(document.querySelector('.masthead-video'), 640, 360);
.masthead {
position: relative;
min-width: 100%;
background-image: none;
}
.masthead-video {
z-index: 0;
}
.masthead-overlay {
background-color: #0000002e;
opacity: 0.5;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
我还尝试了 youtube jquery 插件(jquery.youtubebackground.js),但它仍然无法在移动视图中工作。请帮我解决这个错误。感谢你在期待。
解决方案
推荐阅读
- java - Java:ReentrantLock 不起作用它仍然相互混合
- python - 如何删除每行特殊字符串之后的字符串
- arrays - 如何在C中删除数组中的字符串
- swift - 延迟添加注释直到搜索完成
- c# - 在 C# 中重命名和删除文件夹
- javascript - 在 javascript 中使用 Bootstrap 行和列
- javascript - 在 Angular 中处理外部点击引导模式
- python - Python - 编辑文本文件 - 特定案例
- javascript - Jest - 一个函数模拟多个测试文件的文件
- vba - 如何为列中的每个单元格删除单元格中 8 个数字的前 4 个数字?