这里基本上是我的 html 结构,内容部分是我想要在页眉和页脚之间居中的部分,以便在所有分辨率上它都在中间。我尝试使用 table 方法,在该方法周围放置一个带有 display:table 的部分,然后将内容部分设置为 display:table-cell; 垂直对齐:中间;但它似乎会影响 div/section 在内容中的定位,并将屏幕左上角的部分定位在具有 position:absolute; 的 header 元素的顶部。
<header>
</header>
<section id="container">
<section id="content">
</section>
</section>
<footer>
</footer>