Big set of Gray Code Methods for mourning websites

Source: Internet
Author: User

On the national day of mourning, 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 will be very simple. You only need to add a line of code at the beginning of the CSS file to conform to the w3 standard webpage, 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.

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"/>
The above method is used to collect and sort the original article links from the network.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.