问题
I have some problem with the background-image property in IE-6. In all other browsers, background-image is showing except IE-6. This is the url of my site http://indivar.info/godsak/node/2.
This is what I have written in the css.
body {
background-color: #D3D3D3;
background: url("../images/background.jpg") repeat scroll 0 0 transparent;
margin: 0;
padding: 0;
position:relative;
overflow-x:hidden;
}.
This question will lool outdated as this is related to IE-6. But the client needs it so I have to fix it. One more thing to clear I have checked on windows XP service pack 3 IE-6, there also its working fine. So problem with the IE-6 sp-2 of windows. Thanks in advance.
回答1:
yes in IE Tester it shows fine. But I am using adobe browserlab. http://browserlab.adobe.com/en-us/
Then BrowserLab might be misleading you.
Testing with your live site, it works fine in IE6 here: http://ipinfo.info/netrenderer/
And it works fine in genuine IE6 - I tested it myself locally using a virtual machine.
I don't think there's an actual problem here.
回答2:
Instead of doing shorthand try:
body {
background-image: url("../images/background.jpg");
background-repeat: repeat;
background-color: transparent;
margin: 0;
padding: 0;
position:relative;
overflow-x:hidden;
}
This may/may not work
来源:https://stackoverflow.com/questions/6842126/css-body-background-image-not-showing-in-ie-6