IE7/8 中半透明 png 下的文本完全不透明

发布于 2024-11-26 21:20:42 字数 312 浏览 6 评论 0原文

这里的图像很好地说明了这个问题:

问题:

iebug

它应该是什么样子:

chrome

但简而言之,我有一个带有 alpha 透明度的 png,显示在页面其余部分的顶部。在 IE7 和 IE8 中,png 图像下方的文本具有完全不透明度,而 png 图像下方的图像正确地没有。

我应该怎么做才能解决这个问题?

The images here illustrate the issue pretty well:

The problem:

iebug

What it should look like:

chrome

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫思念不要吵 2024-12-03 21:20:42

您的问题不在于图像下文本的透明度。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文