有没有一个解决方案/教程,全宽视频无边框?
我看了一个现有的解决方案:
Full-width vimeo wrapper background
我试过了,但是当我缩放到不同的视窗大小时,我得到了不需要的(黑色)边框。
<div class="video">
<iframe src="https://player.vimeo.com/video/120893740?title=0& amp;byline=0&portrait=0&color=3a6774&autoplay=1&loop=1" width="960" height="600" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div
class="overlay">
<h1>HEADING HERE</h1>
<p>Content Here</p>
</div>
</div>
CSS:
body {
margin: 0;
padding: 0;
}
h1, p {
text-align: center
}
.video {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%}
.video iframe {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
}
.video .overlay {
position: absolute;
z-index: 2;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0);
}
提前谢谢
最佳答案
从iframe标记中删除inlinewidth="960" height="600"
,看看这是否有帮助
关于html - 如何创建全 Angular 背景视频(Vimeo)?在Bootstrap环境中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29099908/