开发者

How to access object.style.filter for firefox browser?

开发者 https://www.devze.com 2023-03-30 07:32 出处:网络
I\'m using object.style.filter=\'Gray\', object.style.filter=\'fliph\', object.style.filter=\'flipv\', object.styl开发者_JAVA技巧e.filter=\'invert\' this is working in IE, but in firefox its not worki

I'm using object.style.filter='Gray', object.style.filter='fliph', object.style.filter='flipv', object.styl开发者_JAVA技巧e.filter='invert' this is working in IE, but in firefox its not working. Can u help for this.


.style.filter in Firefox exposes the filter CSS property that SVG defines. Valid values for this property do not include 'Gray'. See http://www.w3.org/TR/SVG11/filters.html#FilterProperty and https://developer.mozilla.org/en/applying_svg_effects_to_html_content#Example.3a.c2.a0Filtering


Filters are IE specific. CSS will work to set the color in both IE and FF:

object.style.backgroundColor = 'gray'

If your goal is to tint the entire div, your best bet is to create a new div which covers the first, and is partially transparent.

0

精彩评论

暂无评论...
验证码 换一张
取 消