Home  >  Article  >  Web Front-end  >  Detailed explanation of 4 types of codes that change the website to black and white

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

巴扎黑
巴扎黑Original
2017-06-09 14:16:042793browse

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 93f0f5c25f18dab9d176bd4f6de5d30e and 9c3bca370b5104690d9ef395f2c5f8d1 of the web page/template:

<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 100db36a723c770d327fc0aef2ce13b1 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 69072d9f468271be1a9d8c4449214c5f and eb50c9ec568c9b96871b9e94a1ff3fd1 in FLASH code:

<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!

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