gpt4 book ai didi

internet-explorer - IE中的不透明度问题

转载 作者:太空宇宙 更新时间:2023-11-04 00:13:57 25 4
gpt4 key购买 nike

我正在尝试在 css 中为 IE 创建不透明背景色

css 过滤器会将元素的不透明度更改为 80,我只希望背景色透明。

.element{

//for Chrome and FF
'background-color': rgba(0, 0, 0, 0.8)

//for IE..but it will make entire element having 80 opacity instead of the background-color only....
filter:alpha(opacity=80)


}

感谢您的帮助。

最佳答案

我建议使用名为 CSS3Pie 的 IE 脚本.

这是一个将一些 CSS3 属性实现到旧版 IE 中的脚本,包括具有 alpha channel 颜色的背景。这意味着您可以像所有其他浏览器一样为 IE 编写(几乎)标准的 CSS 代码。

在您的站点中使用 PIE.htc 文件后,您的 CSS 代码将如下所示:

.element{
//for Chrome and FF
background: rgba(0, 0, 0, 0.8);
//for IE...
-pie-background: rgba(0, 0, 0, 0.8);
behavior: url(PIE.htc);
}

参见 CSS3Pie documentation了解更多信息。

希望对您有所帮助。

关于internet-explorer - IE中的不透明度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12045166/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com