13763600453 在線客服 聯系我們 返回頂部
企業動態 技術分享 行業動態

CSS怎么使網頁全部變成灰色

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:

在線咨詢
Copyright © 2019 www.599153.live 星星設計 版權所有 黑ICP備15006930號-3  技術支持:星星設計
斗棋河南麻将下载安装 北京快三赢钱技巧 江西多乐彩有遗漏 体彩排列五开奖视频 山西快乐十分玩法 17455正版平特一肖图 股票下跌换手率 内蒙十一选五专家预测 新牛人配资 上海11选5预测中奖方式 幸运飞艇看号技巧图 稳赚