IE7/8 中半透明 png 下的文本完全不透明
这里的图像很好地说明了这个问题:
问题:
它应该是什么样子:
但简而言之,我有一个带有 alpha 透明度的 png,显示在页面其余部分的顶部。在 IE7 和 IE8 中,png 图像下方的文本具有完全不透明度,而 png 图像下方的图像正确地没有。
我应该怎么做才能解决这个问题?
The images here illustrate the issue pretty well:
The problem:
What it should look like:
But in a nutshell I have a png with alpha transparency displaying over the top of the rest of the page. In IE7 and IE8 the text below the png image has full opacity where as the image below the png image correctly does not.
What should I do to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题不在于图像下文本的透明度。
IE 正在渲染文本后面的透明图像,因此您的问题与 Z-Index 有关。您可以尝试将
position:relative
设置为菜单的父 dom 元素。Your problem is not the transparency of the text under the image.
IE is rendering the transparent image BEHIND the text, so your problem is Z-Index related. You could try setting
position:relative
to the parent dom element of your menu.