CSS -webkit-过滤器 : grayscale(0%) don't work in IE 10 and Safari

标签 css filter safari internet-explorer-10 grayscale

我的 CSS Style -webkit-filter: grayscale(0%) 和 filter:none 在 IE 10 和 Safari 中不起作用。

例如,我有 slider 图像,但图像上有一个灰度滤镜(我的主页需要这个)

我实现了这个 CSS 代码:

.page-id-8 .slider-entry-image img{
    min-width:220px !important;
    width:220px !important;
    -webkit-filter: none!important;
    filter: url(""); /* Firefox 10+, Firefox on Android */
    filter: none!important; /* IE6-9 */
    -webkit-filter: grayscale(0%);
}

但是 slider 图像在 IE 10 和 Safari 中是灰色的:

enter image description here

但我需要这个 View :

enter image description here

URL LINK

我希望有人能帮助我。

最佳答案

对所有浏览器使用它

-webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
  filter: grayscale(100%);
  filter: url(grayscale.svg); /* Firefox 4+ */
  filter: gray; /* IE 6-9 */

引用http://labs.voronianski.com/css3-grayscale/

关于CSS -webkit-过滤器 : grayscale(0%) don't work in IE 10 and Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25238120/

相关文章:

html - (CSS) 从中心向左对齐 div 元素

list - 如何过滤和删除重复的 JSON 列表?

jquery 如果 url 第一个路径名与 href 匹配,则

javascript - Array.push.call on window/global 和 numeric 属性

html - 更改链接背景的大小

javascript - 最初放入 Bootstrap 容器中的没有预定义宽度的固定元素不会从父级继承宽度

css - 显示 : table-cell floated DIV height expanding to 100% only working in Chrome

c++ - 使用特定模式从 Boost 获取子图

html - 防止 IOS/Safari 从链接打开应用程序

HTML5 占位符在焦点上消失