html - 当覆盖的 div 一直向下滚动(但仅在 Chrome 中)时,出现在全屏元素下的神秘间隙
问题描述
我有一个应始终占据页面 100% 的全屏传单地图
当我的引导 jumbotron(绝对定位的 div)一直向下滚动时,地图下方会出现一个间隙,只有当 jumbotron 一直向上滚动时才会消失。
它似乎只发生在 Chrome / Brave 中,而不是 Mozilla 或 Safari。
我该如何解决这个问题以及发生了什么?
这个是正常的
这就是差距
html, body, #map (#map is the map)
{
height: 100%;
width: 100%;
padding: 0px;
margin: 0px;
border: 0px;
}
/* === Jumbotron Displaying Music (when scrolled, problem occurs === */
#active-music-jumbo
{
top:10px;
right:10px;
min-width:480px;
}
#active-music-jumbo *
{
position:relative;
z-index:1002;
}
#active-music-jumbo
{
color: #ffffff;
text-shadow:1px 1px 3px rgba(0,0,0,.8);
z-index:1000;
position:absolute;
float: both;
clear:none;
overflow-y:scroll;
scroll-behavior: smooth;
background-color: rgba(0,0,0,0.2);
max-height: calc(100% - 20px);
display:none;
max-width: 480px;
}
要复制,您可以在此处访问实时站点
解决方案
推荐阅读
- javascript - 如何根据点击的按钮动态播放视频
- iis - 如何使用 PRTG 网络监视器监视 IIS 应用程序池工作进程
- c# - Jquery Modal 未在按钮单击 ASP.NET 上显示
- wordpress - 控制在 Wordpress 中显示多少帖子
- r - 如何使用 R 中的 ggplot 将两个数据帧的点相互连接?
- c# - 为什么它不将 Bool 变量传递给另一个类?
- docker - Cloud Run 的“gcloud builds submit”
- r - 无法在 R 中合并两个数据框
- web - 服务器上的某些文件可能丢失或不正确。清除浏览器缓存并重试。如果问题仍然存在,请联系网站作者
- c - 如何将 http C 库正确包含到 Android 项目中?