我正在为一个SMF论坛制作布局,当浏览器窗口足够宽时,背景图像会居中显示。但是当我开始缩小浏览器窗口时,背景图像开始向左移动。下面是我的当前CSS代码:
body
{
background: #fefff1 url(../images/img/bg.gif) no-repeat;
background-position:top center;
margin: 0 auto;
color: #7C3C4A;
padding: 0px 5%;
font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;
}
这是论坛的截图,帮助您更好地了解它: http://i.imgur.com/49pRI.png