I remember when the famous singer Qiao Renliang passed away last year, Baidu Images went so far as to create a black-and-white webpage for him, making the entire site appear in black and white whenever users searched for Qiao Renliang on Baidu Images. For some days that require mourning, many people also want to make their websites entirely black and white to express their grief.
Below, I’ll provide a tutorial and code for enabling black and white across the entire site. You only need to define a single CSS rule. To turn the entire website into grayscale, you don’t need to adjust the color tone of each image one by one; simply add the following definition to the HTML node in your CSS file. The code is as follows:
html {-webkit-filter: grayscale(100%);}
If your website does not reference a CSS file, you can directly include the following HTML code.
<style type="text/css">
html {-webkit-filter: grayscale(100%);}
</style>
The above code is known to work with QQ Browser, 360 Browser, and Internet Explorer.