Detailed explanation of 4 types of codes that change the website to black and white

巴扎黑
Release: 2017-06-09 14:16:04
Original
2705 people have browsed it

The 2008.5.12 Wenchuan earthquake in Sichuan took away many lives, which is regrettable. In order to express its deep condolences for the victims, the State Council decided May 19 to 21, 2008 as the National Day of Mourning. During this period, many websites changed their styles to "black, white, and gray" to express condolences for the victims. It is recommended that webmasters across the country take action to mourn the compatriots who died in the earthquake
The 2008.5.12 Wenchuan earthquake in Sichuan took away many lives, which is regrettable. In order to express its deep condolences to the compatriots who died in the earthquake, the State Council decided on May 2008 March 19th to 21st is a national day of mourning. During this period, many websites changed their styles to "black, white, and gray" to express condolences for the victims. It is recommended that webmasters across the country take action to mourn the compatriots who died in the earthquake.
Related articles:One line of CSS code to make the website black and white.
In order to facilitate individual webmasters to express their condolences, we now summarize the practical CSS filter codes and make slight adjustments to convert thewebsite into a "black, white, and gray" style.
Method 1:

html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
Copy after login

The above code can change the web page to black and white and gray network. Add the code to the top of CSS to achieve plain decoration.
Method 2:
If the website does not use CSS files, you can insert between the HTML codeand

of the web page/template:

Copy after login

Some webmasters’ websites may not be able to use this css because the website does not use the latest web page standard protocol. Replace theat the top of the webpage with the following code:

 
Copy after login

Method 3:
There are some websites where the color of FLASH animation cannot be controlled by CSS filters. , you can insert between andin FLASH code:

 
Copy after login

Method 4:
The simplest way to change the page The code for black, white and gray is between the head: (or the selector in the CSS file is html or body)

Copy after login

The above is the detailed content of Detailed explanation of 4 types of codes that change the website to black and white. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!