当我们需要将网页置灰的时候,可以通过css代码实现
body, html {
filter: grayscale(100%)!important;
-webkit-filter: grayscale(95%)!important;
-moz-filter: grayscale(100%)!important;
-ms-filter: grayscale(100%)!important;
-o-filter: grayscale(100%)!important;
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(1)!important;
}