去除视频与外框之间有个白边
去除视频与外框之间有个白边
1.在video标签外面再加一层盒子并给video标签添加一个style样式
<div class="banner2">
<div id="video">
<video style="width: 100%; height: 100%; object-fit: fill" src="../images/index/subtitled-PUA video 0209.m4v" controls poster="../images/index/fengmian.png"></video>
</div>
</div>
2.添加样式
.banner2 {
height: 15.1944rem;
width: 100%;
background: url(../images/index/cat-v4_08.png) no-repeat;
background-size: cover;
background-position: 100%, 100%;
position: relative;
}
.banner2 #video {
height: 14.1rem;
width: 8.88rem;
position: absolute;
/* background-color: pink; */
top: .58rem;
left: .58rem;
}
.banner2 #video video {
width: 100%;
height: 100%;
}