这是我的CSS背景,但问题是背景中的所有边缘仍然存在4px的间隙。怎么了?为什么背景没有被完全覆盖
#header-color {
background:transparent;
background: #cccccc; /* old browsers */
background: -moz-linear-gradient(top, #cccccc 24%, #eeeeee 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(24%,#cccccc), color-stop(100%,#eeeeee)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0); /* ie */
background-repeat:repeat;
background-position:top;
}
题外话:我建议对IE使用[CSS3Pie](http://css3pie.com/),因为它可以让你使用标准的CSS渐变而不是那些可怕的'filter'风格。 – Spudley
您在其他地方是否在该元素上设置了边距或边框? (即内联或通过班级)。我不认为背景适用于边距,显然边界是自己设计的。但是,填充确实接受元素的背景样式 – wolv2012