我的网站(http://www.webbuddies.co.za)运行良好,但当以1280x1024分辨率查看时,页面底部有一块白色可见,我想去掉它。背景是一个渐变图像,而不是重新创建图像,我只想改变背景的颜色来匹配渐变的底部。这可以做到吗?
这是我的CSS:
body {
background: transparent url("Images/Background.png") repeat-x;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}如果我将transparent更改为一种颜色,图像将消失...有什么想法吗?
提前感谢!
发布于 2010-10-16 04:21:51
您可以在CSS中使用background-color属性,将颜色设置为图像的底色。例如:
background-color:#00ff00;发布于 2010-10-16 04:26:09
只需像这样设置一个额外的背景色:
body {
background-image:url("Images/Background.png");
background-repeat:repeat-x;
background-color:#999999; /* << inset your gray here */
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}https://stackoverflow.com/questions/3945818
复制相似问题