Home>Article>Web Front-end> A tribute that cannot be forgotten: Tutorial on changing the background of a web page to black and white
Unforgettable condolences: In order to express condolences for the people who died in this major epidemic, php Chinese website changed the entire website to black and white to express condolences to the deceased.
The code is shared with everyone below:
Black and white CSS code
html{ -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: gray; }
It’s very simple, just add a piece of code.
Usage Tutorial:
This code can change the web page to black and white. Add the code to the top of the CSS to make the entire site plain.
The black and white rendering after adding:
The above is the detailed content of A tribute that cannot be forgotten: Tutorial on changing the background of a web page to black and white. For more information, please follow other related articles on the PHP Chinese website!