六合彩码报
400-6688-8899 在线客服 人才招聘 返回顶部
企业动态 技术分享 行业动态

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

2016-10-13分享

六合彩码报 www.6p8u.com 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:

在线咨询
Copyright © 2002-2011 织梦模板 版权所有 闽CIP123456号  技术支持:寻模板
  • 山西省地勘局211队举办“安全生产月”知识培训--黄河新闻网 2018-08-06
  • 创新步伐永不停 “智”检尖兵勇当先 ——“互联网+”助力上海检验检疫通检再提速 2018-08-06
  • 【新媒体矩阵】长城评论微信公众号 2018-08-03
  • 吕洪蕾:网络信息技术在干部工作中的运用研究 2018-08-03
  • 天津今年前5月开出环保罚单6614万元 2018-07-26
  • 吴尊送儿子上学晒自拍 父子颜值超高Max笑容灿烂 2018-07-26
  • 795| 279| 527| 510| 851| 590| 1000| 199| 362| 266|