我有这个作为我的CSS样式。在调整浏览器窗口大小时,我的#pg_wrap
未与背景图像居中。我的屏幕截图是当您将浏览器窗口的宽度减少到小于1344像素(宽度不一定是这个数字,只是一个测试数字)。背景图像定位问题
屏幕截图是用Firefox做的,它是这样做的。 Chrome不会这样做。我如何获得背景图片以保持?
body
{
text-align: center;
background-image: url('p_bg_75.jpg');
background-repeat: repeat-y;
background-color: black;
background-attachment:fixed
margin: 0px;
padding: 0px;
}
#pg_wrap
{
margin-left: auto;
margin-right: auto;
width: 1344px;
height: 1000px;
border: 1px solid white;
text-align: center;
}
分号NINJA! – jcelgin 2009-04-13 03:30:44