IE渐变过滤器背景覆盖活动背景颜色 [英] IE gradient filter background overriding active background color

查看:126
本文介绍了IE渐变过滤器背景覆盖活动背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计一个div,使用jQuery在选中时将 .active 类添加到div。 div的背景是一个渐变,我想保留。我使用过滤器:属性在IE中显示渐变。活动类将背景修改为纯色,但在IE中, filter: CSS属性将覆盖 .active 造型。



这是否有解决方案,因此 .active 类将在IE中显示正确的背景颜色? / p>

查看此示例: http://jsbin.com/ eDEjuzu / 1 /



感谢

解决方案

.active 类添加 filter:none 。对于使用过滤器属性替换普通背景值的IE6-9渐变,因此您需要取消渐变过滤器



/ eDEjuzu / 3 / edit?html,输出rel =nofollow>更新JSBin


I am styling a div that uses jQuery to add a .active class to the div when selected. The background of the div is a gradient, which I would like to keep. I am using the filter: property to display the gradient in IE. The active class modifies the background to a solid color, but in IE, the filter: CSS property overrides the .active styling.

Is there a solution to this, so the .active class will display the correct background color in IE?

See this example: http://jsbin.com/eDEjuzu/1/

Thanks

解决方案

Just add filter: none to the .active class. For IE6-9 gradients made with the filter property override normal background values, so you need to cancel out the gradient filter on hover in addition to changing the background color.

Updated JSBin

这篇关于IE渐变过滤器背景覆盖活动背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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