Color

Gray

<img src="img/color.jpg" class="grayscale">
<img src="img/color.jpg" class="grayscale grayscale-fade">
<img src="img/color.jpg" class="grayscale" alt="Decorative lights">
<img src="img/color.jpg" class="grayscale" style="
position  : absolute;
top       : 0;
left      : 50%;
margin    : 0 0 0 -90px;
padding   : 5px;
border    : 1px solid #ddd;
">
<div style="
background-image: url(img/color.jpg);
display         : inline-block;
width           : 180px;
height          : 72px;
" class="grayscale"></div>
<div style="
background-image   : url(img/color-sprite.jpg);
background-position: -180px 0;
display            : inline-block;
width              : 180px;
height             : 72px;
" class="grayscale"></div>
<div style="
background-image   : url(img/color-sprite-lg.jpg);
background-size    : auto 72px;
background-position: -180px 0;
display            : inline-block;
width              : 180px;
height             : 72px;
" class="grayscale"></div>

Toggling Grayscale

$('.grayscale').toggleClass('grayscale-off');

适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。

下载代码说明
X关闭

基于jQuery实现彩色图片转换黑白图片特效源码

基于jQuery实现彩色图片转换黑白图片特效源码是一款跨浏览器支持,使用多种技术手段来将彩色图片转换为黑白图片效果。本段特效源码可以在各大网站使用,有需要的朋友直接下载使用,本段源码兼容目前最新的各类主流浏览器,是一款非常优秀的特效源码,希望对大家有所帮助,有问题及时跟我留言!