<分区>
CSS 有命令 filter 并且它有很多功能示例:
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)不支持 filter
我的问题:也许这个函数有替代方法或其他东西来获得类似的结果,例如:灰度、棕褐色、饱和度、亮度、对比度、模糊
我的尝试:
添加前缀:-moz-, -o-, -ms-
来自微软官方网站示例的内容,但不起作用:/来源:http://msdn.microsoft.com/en-us/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/)我尝试为我的 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 上运行的解决方案