相对+绝对定位是您最好的选择:
#header { position: relative; min-height: 150px;}#header-content { position: absolute; bottom: 0; left: 0;}#header, #header * { background: rgba(40, 40, 100, 0.25);}<div id="header"> <h1>Title</h1> <div id="header-content">Some content</div></div>但是您可能会遇到问题。当我尝试它时,在内容下方显示下拉菜单时出现问题。只是不漂亮。
坦白地说,对于垂直居中问题以及项目的垂直对齐问题并非固定高度,仅使用表格会更容易。



