出于某种原因,在 Chrome 上,我的视频容器元素底部有一个白色的底部边框。
<video id="cover" src="video.mp4" autoplay="" loop=""></video>
有人知道如何解决这个问题吗?
这是 video
元素的计算样式。
background-color:rgb(0, 0, 0);
border-bottom-color:rgb(0, 0, 0);
border-bottom-style:none;
border-bottom-width:0px;
border-image-outset:0px;
border-image-repeat:stretch;
border-image-slice:100%;
border-image-source:none;
border-image-width:1;
border-left-color:rgb(0, 0, 0);
border-left-style:none;
border-left-width:0px;
border-right-color:rgb(0, 0, 0);
border-right-style:none;
border-right-width:0px;
border-top-color:rgb(0, 0, 0);
border-top-style:none;
border-top-width:0px;
display:inline-block;
font-family:Times;
font-size:16px;
font-stretch:normal;
font-style:normal;
font-variant-caps:normal;
font-variant-ligatures:normal;
font-variant-numeric:normal;
font-weight:normal;
height:798.547px;
line-height:16px;
margin-bottom:0px;
margin-left:0px;
margin-right:0px;
margin-top:0px;
object-fit:contain;
opacity:1;
padding-bottom:0px;
padding-left:0px;
padding-right:0px;
padding-top:0px;
vertical-align:baseline;
width:1680px;
最佳答案
聚会有点晚了,但这里有一个对我有用的小而简单的 hack:
video {
margin-bottom: -1px;
}
关于html5 视频元素 1px 白色底部边框 chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40432274/