CSS具有命令过滤器,并且具有许多功能示例:
filter: grayscale(0);
filter: sepia(0);
filter: saturate(1);
filter: hue-rotate(0deg);
filter: invert(0);
filter: opacity(1);
filter: brightness(1);
filter: contrast(1);
filter: blur(0px);
过滤器支持Chrome 18 +,Safari 6+。(来源:http://css3.bradshawenterprises.com/filters/)
我需要使用灰度,棕褐色,饱和度,亮度,对比度,模糊。我无法使用任何一种,因为很少有浏览器(例如,mozilla,opera)不支持过滤器
我的问题:也许此功能有替代方法或其他获得类似结果的功能,例如:灰度,棕褐色,饱和度,亮度,对比度,模糊
我尝试的是:添加前缀: -moz-, -o-, -ms-
来自微软官方网站示例的内容,但不起作用:/来源:http : //msdn.microsoft.com/zh-cn/library/ms532847(v=vs.85 ) .aspx),如下所示:
filter:progid:DXImageTransform.Microsoft.MotionBlur(strength=50)
progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); width=50%
有趣的是。我找到了适用于Internet Explorer的解决方案:6,7,8(来源:http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ )我尝试为我对其进行测试11,但这是行不通的。代码:
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#81a8cb', endColorstr='#4477a1'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#81a8cb', endColorstr='#4477a1')"; /* IE8 */
我需要找到至少可以在最新版本的Mozilla,Opera,Internet Explorer上运行的解决方案
Mozilla Firefox:根据MDN(当前的稳定版本为32),Firefox 34中将提供无前缀支持。几周后,如果我很了解,您将需要通过url()使用SVG过滤器。
注意:如果您支持Firefox ESR-扩展支持版本-可能由许多IT部门和组织部署,则Fx 24 ESR在2014年10月之后将不再受支持,但Fx 31 ESR将持续到2015年中或年底。(来源)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句