衡阳企业网站建设教你CSS怎么使网页全部变成灰色
作者:jianzhan 发布时间:2020-07-26 19:35 来源:个人免费云主机_自己创建一个网站_永久免费个人网站申请_建立免费网站_网站免费搭建
本文摘要: 衡阳企业网站建设教你CSS怎么使网页全部变成灰色2018-07-01分享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:im
衡阳企业网站建设教你CSS怎么使网页全部变成灰色
2018-07-01
分享

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:
<<上一篇:案例赏析——海南佳乐汽车租赁
下一篇:浅谈APP营销的模式哪些? >>