FreeABC
记忆重叠

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

未经允许不得转载:Free-Abc智能 » CSS3 grayscale滤镜图片变黑白实例页面
分享到: 更多 (0)