首页 » web » css » CSS3 grayscale滤镜图片变黑白实例页面

CSS3 grayscale滤镜图片变黑白实例页面

 
CSS代码:
.gray { 
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    
    filter: grayscale(100%);
  
    filter: gray;
}
HTML代码:
<img src="http://image.zhangxinxu.com/image/study/s/s256/mm1.jpg" />
<img src="http://image.zhangxinxu.com/image/study/s/s256/mm1.jpg" class="gray" />

 

 

转至http://www.zhangxinxu.com/study/201208/css3-grayscale-filter.html

原文链接:CSS3 grayscale滤镜图片变黑白实例页面,转载请注明来源!

1