The Wenchuan earthquake and Yushu earthquake, the national mourning day, many website interfaces have become black and white, to commemorate those who died in the earthquake. For ordinary webmasters, nothing can be done for disasters, but they can also turn their websites into black and white to remember those who have died.
If you use the traditional method to change the website to black or white, you need to change the page file and change the image. If your website uses CSS, it is very simple. As long as it is a Web page that complies with the W3 standard, you can add a line of code at the beginning of the CSS file, this Code uses the CSS Filter to filter out the color part of the webpage.
HTML {filter: progid: DXImageTransform. Microsoft. basicimage (grayscale = 1) ;}( no line feed)
After the code is added, refresh the page again and you will find that the page has become black and white.
The webmaster hasn't changed yet. Let's mourn the dead compatriots in the disaster area !!!!!
PS: Pay attention to the disaster area and follow zhixun!
Other methods:
Method 1:
On your website page
<Head> Add the following code:
<Style type = "text/CSS">
Body {filter: Gray}
</Style>
Method 2:
On your website page
<Head> Add the following code:
<Style>
HTML {filter: progid: DXImageTransform. Microsoft. basicimage (grayscale = 1 );}
</Style>
Method 3:
Find your website's CSS file and put the following code in the header of the website's CSS file (this is the method used by CERNET)
Body {
Filter: Gray;
}
Method 4:
Find your website's CSS file and put the following code in the website's CSS file header.
HTML {filter: progid: DXImageTransform. Microsoft. basicimage (grayscale = 1 );}
Method 5:
Find your CSS file and modify the CSS code file. In the following files
Form, Div, span, IMG, UL, ol, Li ,{
Add filter: Gray;
Some website Flash Animation colors cannot be controlled by CSS filters. You can <object…> And </Object>:
Copy content to clipboard
Code:
<Param = "false" name = "menu"/>
<Param = "Opaque" name = "wmode"/>
According to the State Council's documents, the national day of mourning, during which the national and overseas institutions will mourn and stop public entertainment activities, and the Foreign Ministry of Foreign Affairs and Chinese embassies and consulates will set up a condolence book. At that time, cars, trains, and ships will whistle and air defense alarms will sound. The Chinese webmaster station will replace the whole station with a hardware package. We recommend that you replace all Chinese sites with plain files.
To facilitate site mourning, we provide plain code to express our condolences. The following is the full-site CSS code.
HTML {filter: progid: DXImageTransform. Microsoft. basicimage (grayscale = 1 );} |
Usage: This code changes the webpage to black and white. You can add the code to the top of CSS to implement the installation. It is recommended that the Chinese webmaster be moved up. Mourn for the victims of the earthquake.
If the website does not use CSS, you can insert it between the HTML code
<Style> HTML {filter: progid: DXImageTransform. Microsoft. basicimage (grayscale = 1 );} </Style> |
Some webmasters may not be able to use this CSS because the website does not use the latest standard webpage protocol.
<! 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"> |
Replace <HTML> at the top of the webpage with the above Code.
Some website Flash Animation colors cannot be controlled by CSS filters. You can <object…> And </Object>:
<Param value = "false" name = "menu"/> <Param value = "Opaque" name = "wmode"/> |
The simplest code for turning pages into gray is to add <style type = "text/CSS">
HTML { Filter: Gray } </Style> |
The simplest code for turning a page into gray is to add style = "filter: Gray" to the body"
<Body style = "filter: Gray"> |
Modify the/images/Header/header.css file under the CSS file of your discuz forum.