我有这样一个背景,css代码如下:
body {
background: #FFF url('images/bg.png') no-repeat bottom center;
margin-bottom: -500px;
width: 100%;
height: 100%;
color:#999;
}
这个图片高度为400像素,我希望将它对齐至页面底部。
目前来看,此方法只在Firefox浏览器中有效。在Chrome和IE浏览器中,背景位置是在顶部居中,而不是底部居中。
html
上设置了height: 100%;
吗? - jensgram