使用灰度悬停效果,在For IE中无法正常工作

时间:2012-11-09 03:40:47

标签: css css3 hover

效果在Chrome中效果很好但在IE和FF中失败。请在多个浏览器中查看此链接:

http://thebc.co/our-work

.portfolio-img{filter: url("data:image/svg+xml;utf8,#grayscale");/* Firefox 10+ /filter: gray;/ IE6-9 /-webkit-filter:grayscale(100%);/ Chrome 19+ & Safari 6+ /-webkit-transition: all .6s ease;/ Fade to color for Chrome and Safari /-webkit-backface-visibility: hidden; / Fix for transition flickering */-moz-box-shadow:0 0 2px rgba(0,0,0,0.2);-webkit-box-shadow:0 0 2px rgba(0,0,0,0.2);box-shadow:0 0 2px rgba(0,0,0,0.2)}

.portfolio-img:hover{filter:none;-webkit-filter:grayscale(0%);-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4);-o-transition:.8s;-ms-transition:.8s;-moz-transition:.8s;-webkit-transition:.8s;transition:.8s}

1 个答案:

答案 0 :(得分:1)

因为 IE 以及 Firefox 版本16不支持过滤器

来自来源http://caniuse.com/css-filters