Html 下载文件时,页脚会向上推
我有一个带有以下css的页脚Html 下载文件时,页脚会向上推,html,css,angular,Html,Css,Angular,我有一个带有以下css的页脚 #footer { position: absolute; bottom: 0; width: 100%; height:8rem; } 无论页面内容是否小于/大于屏幕大小,都可以将页脚放在页面底部 但当我在页面上下载文件时,页面底部的文件下载栏会将页脚向上推。有没有办法防止这种情况?这种情况发生在chrome中 <div id="page-container"> <div id="footer">
#footer {
position: absolute;
bottom: 0;
width: 100%;
height:8rem;
}
无论页面内容是否小于/大于屏幕大小,都可以将页脚放在页面底部
但当我在页面上下载文件时,页面底部的文件下载栏会将页脚向上推。有没有办法防止这种情况?这种情况发生在chrome中
<div id="page-container">
<div id="footer">
</div>
#page-container {
position: relative;
min-height: 100vh
}
#页面容器{
位置:相对位置;
最低高度:100vh
}
下载栏(我想你说的是Chrome)不被视为视口的一部分,因此没有办法阻止这一点。你能提供一个屏幕截图吗?你用的是什么浏览器?你的其他元素高度是什么样子(百分比、vh、rem等…)@scottyfullstack使用chrome