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 the website into a "black, white, and gray" style.
Method 1:
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
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 code
<style type=”text/css”> html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); } </style>
Some webmasters’ websites may not be able to use this css because the website does not use the latest web page standard protocol. Replace the at the top of the webpage with the following code:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”>
Method 3:
There are some websites where the color of FLASH animation cannot be controlled by CSS filters. , you can insert between
<param value=”false” name=”menu”/> <param value=”opaque” name=”wmode”/>
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)
<style type=”text/css”> html { filter: gray; } </style>
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!