我的问题特定于背景图像。我已将背景图像应用于身体并将其水平居中。对于每一页,我将在标题下方添加一个段落,每个段落的大小都会不同,从而导致滚动。背景图像必须在段落后面流动,但我不能让正文标签扩展以包含段落,这意味着当您向下滚动时背景图像会被切断。我不想设置特定的高度,因为这会使页面滚动到段落之外。我已经尝试了几乎所有我能想到的相对/绝对位置和高度/最小高度的组合。
<html>
<body>
<div class="paragraph">
<p>text!</p>
</div
</html>
CSS
html {
background: url('/images/bg.png');
margin: 0;
padding: 0;
height: 100%;
min-height: 100%;
}
body {
margin: 0;
padding: 0 0 50px 0;
background-image: url('../images/fullheader.gif');
background-position: center 20px;
background-repeat: no-repeat;
position: absolute;
top: 0px;
bottom: 0px;
right: 0px;
left: 0px;
min-height: 100%;
}
.paragraph {
width: 640px;
padding: 10px 20px;
margin: 400px auto 0 auto;
min-height: 100%;
}
如果有帮助,我可以发布屏幕截图。