CSS背景不透明与rgba不工作在IE 8 [英] CSS background opacity with rgba not working in IE 8

查看:99
本文介绍了CSS背景不透明与rgba不工作在IE 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此CSS作为< div> 的背景不透明度:

 code> background:rgba(255,255,255,0.3); 

它在Firefox中正常工作,但不是在IE 8。 p>

解决方案

创建一个大于1x1像素的png(感谢三十点),并匹配背景的透明度。

编辑:为了支持IE6 +,你可以为png指定bkgd chunk,这是一个颜色,如果不支持,将替换真正的alpha透明度。你可以用gimp修复它。例如


I am using this CSS for background opacity of a <div>:

background: rgba(255, 255, 255, 0.3);

It’s working fine in Firefox, but not in IE 8. How do I make it work?

解决方案

Create a png which is larger than 1x1 pixel (thanks thirtydot), and which matches the transparency of your background.

EDIT : to fall back for IE6+ support, you can specify bkgd chunk for the png, this is a color which will replace the true alpha transparency if it is not supported. You can fix it with gimp eg.

这篇关于CSS背景不透明与rgba不工作在IE 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆