我有一个问题,这是困扰着我这些天。 我必须做一个布局: a .header和.content像固定高度(例如100px)和100%宽度。 然后,我必须把内容与动态高度,覆盖空隙空间。固定页眉和页脚与动态内容(照片库站点)
[...]
<style type="text/css">
body {margin:0;padding:0;}
.wrapper {height:100%;width:100%;position:absolute;}
.header {position:absolute;top:0;height:100px;width:100%;background:#0F0;}
.footer {position:absolute;bottom:0;height:100px;width:100%;background:#0F0;}
.content {position:absolute;height:100%;width:100%;background:#F00;padding:100px 0;margin:-100px 0;}
</style>
</head>
<body>
<div class="wrapper">
<div class="header">
</div>
<div class="content">
</div>
<div class="footer">
</div>
</div>
</body>
</html>
这种布局民政事务总署允许我把一个标头和固定高度页脚,并与该级尺寸(一div.content内)图像
嗨洛伦佐,你有什么问题?你能否尝试多解释一下。 – hairynuggets
所以你想让'.content'填充'.header'和'.footer'之间的空格? – jackJoe
你想要一个带有滚动固定页眉和页脚和可滚动内容的HTML页面吗? – buschtoens