Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要一个 div 来拉伸页面的高度,如果它和它包含的元素都设置为“height:100%;”
但是,为了使我的粘性页脚起作用,我需要将容器设置为“min-height:100%;”。显然 min-height 的高度不是继承的。解决方案?
我可以吗:
1)在保持其父级设置为最小高度而不是高度的同时拉伸div?
2)是否有一种解决方案可以在不使用最小高度的情况下将页脚设置为粘性?
我想我了解您的问题是什么,如果它与我过去经历过的相同,那么希望这会有所帮助。
在您设置了最小高度的 div 中,尝试添加:
overflow: hidden;
下面的代码语义是否使用了HTML 表格?
<table> <