IE渐变过滤器背景覆盖活动背景颜色 [英] IE gradient filter background overriding active background color
问题描述
我设计一个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.
这篇关于IE渐变过滤器背景覆盖活动背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!