范文 |
这篇文章主要介绍了使用css3使网页、图片变成灰色且兼容大多数浏览器的方法,感兴趣的朋友可以参考下。 在网页头部引用下面内容即可,针对IE、google、火狐、safari、opera都有效。 代码如下: html{filter:grayscale(100%); -webkit-filter:grayscale(100%); -moz-filter:grayscale(100%); -ms-filter:grayscale(100%); -o-filter:grayscale(100%); filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter:grayscale(1)} |