PNG颜色问题
我有一个带有背景颜色的图像,我将其放入具有相同背景颜色的 div 中。由于某种原因,我无法将此图像保存为 PNG 并使图像背景颜色在所有操作系统上的所有浏览器中显示与 div 中的背景颜色相同。
起初,它在 Windows/Mac 上除了 IE 之外的所有浏览器中看起来都很好。因此,我尝试使用tweakPNG 来删除颜色配置文件和伽马属性,这似乎可以修复 IE,但现在由于某种原因我在 Linux 上的 Firefox 中遇到了问题?
有什么想法/见解吗?谢谢
I have an image with a background color and I'm putting that in a div with the same background color. For some reason I cant save this image as a PNG and have the image bg color show the same as the bg color in the div across all browsers on all operating systems.
At first it looked fine on Windows/Mac in every browser except IE. So I tried using tweakPNG to remove the color profile and gamma properties and that seemed to fix for IE but now I have the issue in Firefox on Linux for some reason?
Any ideas/insight? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您没有指定遇到问题的 IE 版本,但已知较旧版本的 IE 存在 bug 且缺少 PNG 功能。
特别是 IE6 根本不支持 PNG 透明度,而 IE7 也有 bug。
有许多基于 Javascript 的技巧可以解决 IE 中的此问题。以下是其中之一的链接: http://www.twinhelix.com/css/iepngfix/ - 但还有许多其他人可以做同样的工作。
如果您在通过tweakPNG 运行图形后遇到Firefox 问题,我的猜测是tweakPNG 稍微损坏了图形。
我的建议是尝试返回到图形的原始版本,并在 IE 中尝试我上面链接的 hack。
You didn't specify which version(s) of IE you had problems with, but older versions of IE are known to have bugs and missing features with PNGs.
In particular IE6 doesn't support PNG transparency at all, and IE7 has bugs with it.
There are a number of Javascript-based hacks available to fix this issue in IE. Here's a link to one of them: http://www.twinhelix.com/css/iepngfix/ - but there are a number of others that do the same job.
If you're having a problem with Firefox after running the graphic through tweakPNG, my guess would be that tweakPNG has corrupted the graphic slightly.
My suggestion would be to try going back to the original version of the graphic, and try out the hack I linked above in IE.
您必须删除 PNG 上的 GAMA 滤镜。
这款软件使它变得快速而轻松。
gAMA
删除
保存
教程此处
You must remove the GAMA filter on your PNG.
This soft make it quickly and easily.
gAMA
Delete
Save
Tutorial here