背景定位-CSS

背景定位-CSS,css,internet-explorer,Css,Internet Explorer,请参阅附件中的截图 IE和chrome的背景都有点不协调(虽然它以前工作过?因此是准确的数字??),但在ffox中看起来不错 这是我认为非常直接的代码。。。我错过什么了吗 #wrapper{ width:100%; overflow:hidden; position:relative; background:url(../images/body-bg.jpg) no-repeat ; background-position: -20px top; } #

请参阅附件中的截图

IE和chrome的背景都有点不协调(虽然它以前工作过?因此是准确的数字??),但在ffox中看起来不错

这是我认为非常直接的代码。。。我错过什么了吗

#wrapper{ width:100%; overflow:hidden; position:relative; background:url(../images/body-bg.jpg) no-repeat ; background-position: -20px top; } #包装纸{ 宽度:100%; 溢出:隐藏; 位置:相对位置; 背景:url(../images/body bg.jpg)不重复; 背景位置:-20px顶部; } 还有一个IE补丁

#wrapper{ background-position: -21px top; } #包装{背景位置:-21px顶部;}

实际上,我只是想让它居中-所以我只想说“居中顶部”

在CSS 2.0中,数值(-21px)和关键字(顶部)的组合是不允许的,而且支持是相当不可靠的。试试
-21px 0px

问题出在哪里(对我来说)还不是很清楚。你能说出“有点不舒服”是什么意思吗?