大家好,我有一个图像在 IE6 上显示背景颜色的问题,它应该是透明背景。在所有其他浏览器上它都显示正常,除了 IE6。
谁能告诉我我做错了什么。尝试将不透明度设置为 0,但它仍然显示背景颜色。
最佳答案
修复非常简单。无需包含任何 JavaScript。像这样定义您的 css 并将您的图像名称包含在过滤器中。
.whatever {
background: none; /* Hide the current background image so you can replace it with the filter*/
width: 500px; /* Must specify width */
height: 176px; /* Must specify height */
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='vehicles.png');
}
关于html - ie6 显示透明背景的图像 (.PNG) 背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4989795/