此问题是Chrome特定的。父div的滚动条覆盖子div
我有一个div容器与position: fixed
和里面我有position: fixed
只有在Chrome浏览器中弹出DIV,容器div的滚动条重叠我弹出股利。 (见附图)
编辑: 添加代码来说明问题:
html, body {
height: 100%;
}
body {
margin:0;
}
#content {
position: fixed;
top: 5px;
left: 0;
right: 0;
bottom: 5px;
width:300px;
overflow-y: scroll;
}
#messages {
overflow: auto;
}
#messages .message {
height: 79px;
background: #999;
border-bottom: 1px solid #000;
}
.popup {
position: fixed;
width:250px;
height:200px;
background-color:red;
top: 50px;
left: 200px
}
.popup .videoTag {
width: 100%;
height: 100%;
}
<div id="container">
<div id="content">
<div id="messages">
<div class="message">example</div>
<div class="message">example</div>
<div class="popup">
<video class="videoTag" controls>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</div>
<div class="message">example</div>
<div class="message">example</div>
<div class="message">example</div>
<div class="message">example</div>
</div>
</div>
</div>
请分享您的代码... –
如果我们可以看到您的HTML标记和您的CSS以及任何相关的JavaScript,将会非常有用。否则,我们不能做任何事情,只能猜测,这对你没有用处。 (请参阅随机猜测答案...) –
@MarkSchultheiss添加了代码段,记住问题只在Chrome上。 – ScrapCode