网站资讯 news
您现在的位置:首页 > 网站资讯 > SS怎么使网页全部变成灰色
NEWS

新闻资讯

SS怎么使网页全部变成灰色

发布时间:2019/02/22 网站资讯 浏览次数:308

Desaturating a color image couldn’t be simpler with CSS3. We’ll apply the filter as a class, as you’d typically desire several images to be affected by the code at the same time:

img.desaturate { filter: grayscale(100%); }

Naturally, all current browsers implement CSS3 filters via vendor prefixes, so our first job is to insert that code, writing in CSS that does not yet exist in order to future-proof our work:

img.desaturate { filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
filter: grayscale(100%);
}

Applying the class to the image is easy:

云风网络是集昆山网站制作,昆山网页设计,昆山网站推广于一体的昆山网络公司,业务涵盖:昆山手机网站制作,昆山网站设计,昆山网络建设,昆山做网站,昆山网站建设,电话:13912673321

点击这里给我发消息 技术咨询
回到顶部