IE gradient filter background overriding active background color

流过昼夜 提交于 2019-12-24 16:16:28

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/19168510/ie-gradient-filter-background-overriding-active-background-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!