问题
我正在使用这个CSS 粘性页脚的实现。它确实:
html,body{
height:100%;
}
我使用(希望)使用重复背景,但是,height:100%
导致此问题的原因:(
来自另一个粘性页脚问题的图像,答案不令人满意)
我的理解是图像在渲染时被调整为窗口的大小,因此永远不会超过这个大小。
问题
是否可以继续使用我现有的 CSS 粘性页脚选择,并在长页面上完全呈现重复的背景图像
或者
是否有另一种支持重复背景的 CSS 粘性页脚选项?
以供参考
<div id="wrap">
<div id="header">Header text</div>
<div id="main">
</div>
</div>
<div id="footer">Footer Text</div>
CSS
* {margin:0;padding:0;}
html, body {height: 100%;}
#wrap {min-height: 100%;}
#main {overflow:auto;
padding-bottom: 180px;} /* must be same height as the footer */
#footer {position: relative;
margin-top: -180px; /* negative value of footer height */
height: 180px;
clear:both;}