Website-wide gray screen code

On important days, sometimes the website will be grayed out, and it can be done with simple operations. Let's see the effect first.

the first method:

<style>
*{
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
    filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
}
</style>

 The second method:

<style>
html{
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter:grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
    filter:gray;
}
body{
    background-blend-mode: luminosity;
}
</style>

The third method:

<style>
*{
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);}
</style>

Of course, there are many kinds of such codes, and the styles are also different, which are for reference only.

Guess you like

Origin blog.csdn.net/maxue20161025/article/details/128133856