Home >headlines >National Memorial Day Memorial: Tutorial on setting black and white web page background

National Memorial Day Memorial: Tutorial on setting black and white web page background

藏色散人
藏色散人Original
2021-12-13 09:37:0110113browse

Unforgettable condolences: Today is the National Memorial Day. PHP Chinese has changed the entire website to black and white to express its condolences to the victims of the Nanjing Massacre.

Don’t forget, don’t forget!

Let’s share the code with you:

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 to the head .

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.

Black and white rendering after adding:

National Memorial Day Memorial: Tutorial on setting black and white web page background

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn