html / body 100%高度不能填充视口的100% [英] html/body 100% height not filling 100% of viewport
问题描述
我的html和body元素没有填充视口的100%,这使我在页脚下方留下了大约200px的空白空间。我曾与检查员一起尝试解决这个问题,但没有任何工作完美。
值得注意的是,我有3x边栏从顶层菜单中激活(艺术家,关于,历史),这些也需要100%的高度,我觉得这可能与这个问题有关。
在这里没有包含任何标记,因为问题相当广泛。
谢谢
http://workshop.oakdesignstudio.com/dwl/
最简单的方法是给你的身体 position:relative;
html {
height:100%;
}
body {
height 100%;
职位:亲属;
}
My html and body elements are not filling 100% of the viewport, which is leaving me with approx 200px of blank space below my footer. I have played with the inspector to try and resolve this problem but nothing is working perfectly.
It is worth noting that I have 3x sidebars that are activated from the top menu (Artists, About, History) and these need to be 100% height too, I feel that this probably has something to do with the issue.
Any help much appreciated, I haven't included any markup here as the problem is quite broad.
Thanks
http://workshop.oakdesignstudio.com/dwl/
The easiest is to give your body position: relative;
So
html{
height: 100%;
}
body{
height 100%;
position: relative;
}
这篇关于html / body 100%高度不能填充视口的100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!