【发布时间】:2018-04-26 01:00:26
【问题描述】:
我正在尝试将视频作为背景附加到文章部分。问题是在小屏幕上它只显示在文章的 1/3 中。为了实现这一点,我使用了文章类、作为包装器的背景 div 和视频元素 id。有什么想法吗?
<article class=”myArticle”>
<div class="fullscreen-bag">
<video id="videoBack">
<source src=" " type="video/mp4">
<source src=" " type="video/ogg">
<source src=" " type="video/webm">
</video>
</div>
<div class="container">
//
//
</div>
</article>
//Css
.myArticle {
position: relative;
overflow: hidden;
}
.fullscreen-bag {
overflow: hidden;
position: absolute;
height: auto;
width: auto;
z-index: -100;
top: 0;
left: 0;
min-width: 100%;
min-height: 100%;
}
#VideoBack {
position: absolute;
z-index: -100;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
【问题讨论】:
标签: html twitter-bootstrap css responsive-design html5-video