【发布时间】:2016-05-31 00:01:21
【问题描述】:
我有一个布局(下面的代码),它在 Chrome 和 Safari 中按预期呈现,但不幸的是,Microsoft Edge 和 Internet Explorer 在元素和我的导航栏之间呈现一个黑条。我能做些什么来阻止这种情况发生?
看这里-
<div class="navbar navbar-inverse" role="navigation" id="slide-nav">
<div class="container" id="logoStripe">
<!-- Links -->
</div>
</div>
<div id="page-content">
<div class="container-fluid adjustedHeight Page1B">
<div class="video-container">
<video autoplay loop id="video">
<source src="Images/Medium.mp4" type="video/mp4" />
Your browser does not support the video tag. I suggest you upgrade your browser.</video>
</div>
</div>
CSS:
.nav-bar{
height:77px;
}
.adjustedHeight {
height: calc(100vh - 77px);
width: 100%;
margin-top: -100px;
padding: 0;
}
video {
height: 100%;
width: 100%;
object-fit : cover;
}
.video-container {
overflow: hidden;
display: block !important;
position: relative;
}
.video-container video {
position: absolute;
z-index: 0;
bottom: 0;
}
【问题讨论】:
-
请创建一个可以重现问题的工作演示。
-
@LGSon 我无法真正显示问题,因为您需要使用 IE 或 edge,但是,here 是创建探针的完整代码的 JSFiddle。
-
我正在浏览我的一些较旧的答案,并找到了以下内容。我更新的答案没有帮助你吗?
标签: html css google-chrome internet-explorer microsoft-edge