; CSS:IE浏览器的背景颜色风格与QUOT版本:RGBA(...)" [英] CSS: IE: Version of style "background-color:rgba(...)"

查看:227
本文介绍了; CSS:IE浏览器的背景颜色风格与QUOT版本:RGBA(...)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,有一个背景图像的DIV和上层建筑的形象应该是0.7不透明的黑色层。

I have a requirement to have a div with a background image, and overtop that image should be a 0.7-opacity black layer.

对于这一点,我使用的是:

For this, I'm using:

background-color:rgba(0, 0, 0, 0.7);
background-image:url(/Images/hash-000000-pattern.gif);

这完美的作品中的一切,但IE浏览器。在IE 6,7和8,在背景色:RGBA(0,0,0,0.7); 不呈现

This works perfectly in everything but IE. In IE 6, 7, and 8, the background-color:rgba(0, 0, 0, 0.7); isn't rendered.

有什么我可以做的CSS不改​​变标记来创建在背景图像变暗不透明黑色层?一些过滤器的风格?

Is there anything I can do in CSS without changing the markup to create a dimmed-opacity black layer over the background image? Some "filter" style?

推荐答案

没有。你唯一的选择是MS-过滤器或略有不同的。

No. The only options you have are ms-filters or a slightly different one.

<!--[if IE]>

   <style type="text/css">

   .color-block {
       background:transparent;
       filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000050,endColorstr=#99000050);
       zoom: 1;
    } 

    </style>

<![endif]-->

看到这一个了: http://www.hedgerwow.com/360 /dhtml/rgba/demo.html

这篇关于; CSS:IE浏览器的背景颜色风格与QUOT版本:RGBA(...)&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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