徐州SEO博益网-网站建设|SEO优化|SEO顾问服务
13815349665 在线客服 联系我们 返回顶部
博益动态 技术分享 行业动态

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

来源:未知 作者:admin 2016-10-13

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:


想了解更多关于CSS,怎么,使,网页,全部,变成,灰色,Desaturat的文章请点击CSS,怎么,使,网页,全部,变成,灰色,Desaturat

非特殊说明,本文为本站原创(翻译)文章,转载请注明:本文转自:徐州博益网络SEO顾问-胡工。

本文链接:http://www.jt516.com/news/jishu/14.html

在线咨询
Copyright © 2019 徐州博益网络公司版权所有。徐州【博益网络】网站建设的网络公司为企业网站SEO优化,SEO建站.
【博益网】✅网站建设 ✅网站优化 ✅SEO优化 ✅搜索引擎外包.【SEO顾问】13815349665.