我想在自己的網站上觀看視頻。但視頻與圖片不一樣高,我需要這個固定的。我怎樣才能確保視頻覆蓋整個列,並且是相同的高度另外兩列,在任何時候都包含自舉列中的mp4視頻
目前,這是我的代碼:
<div class="container" style="width: 100%;">
<div class="row">
<div class="col-md-4 fullscreen-bg">
<video loop muted autoplay poster="img/videoframe.jpg" class="fullscreen-bg__video">
<source src="video/kerntrekken.mp4" type="video/mp4">
</video>
</div>
<div class="col-md-4" style="padding: 0;">
<img src="img/Kluizen.jpg" width="100%" height="354">
</div>
<div class="col-md-4" style="padding: 0;">
<img src="img/Kluizen.jpg" width="100%" height="354">
</div>
</div>
</div>
這是我的CSS:
.fullscreen-bg {
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
padding-left: 0px;
padding-right: 0px;
}
.fullscreen-bg__video {
background-size: cover;
width: 100%;
height: 100%;
}
https://i.gyazo.com/8210a9c6a5e0aa01225526fa70987b65.png