当前位置: 动力学知识库 > 问答 > 编程问答 >

html - PNG transparency of backgrounds to submit buttons or inputs of type image

问题描述:

Hi bit of a silly question.

Are there any png transparency issues with backgrounds to submit buttons or inputs of type image? Or do they behave fine just like img tags with a png image as the source.

I understand for IE6 you need a hack for png transparency to work.

网友答案:

I ran into this issue recently and converted the button images to Gif. There is a minor loss of fidelity, as you have to get by with 256 colors, but transparency works without any hacks.

网友答案:

Yes, if you have png files and you are under IE6, you will witness such problems. But there are solutions too; one being as follows:

http://jquery.andreaseberhard.de/pngFix/

By the way there is no need to use png for input type buttons, etc unless you really need it.

网友答案:

Another issue is metadata which can be contained in png file. If png contains it, then in IE browsers you'll see a bit different colors.

It can be fixed easily. You just need to save your png correctly (disable metadata).

分享给朋友:
您可能感兴趣的文章:
随机阅读: