Web site black and white gray 4 kinds of code detailed explanation

Source: Internet
Author: User
2008.5.12 Sichuan Wenchuan earthquake, took away a lot of life, it is regrettable, in order to express their deep condolences to the victims, the State Council decided May 19, 2008 to 21st as the national day of mourning. In the meantime, many websites have changed their style to "black, white, grey" in order to express their condolences to their fellow victims. Advised the national webmaster to move up, for the victims of the earthquake in mourning
2008.5.12 Sichuan Wenchuan earthquake, took away a lot of life, it is regrettable, in order to express their deep condolences to the victims, the State Council decided May 19, 2008 to 21st as the national day of mourning. In the meantime, many websites have changed their style to "black, white, grey" in order to express their condolences to their fellow victims. Advised the national stationmaster to move up, for in the earthquake died of compatriots mourning.
   Related articles: website Black white CSS Line code implementation
In order to facilitate the personal webmaster to express condolences, now summarizes the CSS practical filter code, make a slight adjustment, you can The website is converted to "black, white, gray" style.
method One:

HTML {filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1);}

The above code can change the Web page to black and white gray network, add code to the top of the CSS can be implemented goose.
Method Two:
If the Web site does not use a CSS file, you can insert it between the HTML code of the Web page/template

<style type= "Text/css" >html{filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1);} </style>

Some webmaster sites may use this CSS to not take effect because the site is not using the latest standard protocol for Web pages. Replace the

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

Method Three:
There are some Web site Flash animation colors can not be controlled by the CSS filter, in the Flash code <object ...> and </object> inserted between:

<param value= "false" name= "menu"/> <param value= "opaque" name= "wmode"/>

Method Four:
The simplest code to turn a page into black and white is between the head: (or the selector in a CSS file is HTML or body)

<style type= "Text/css" >html {filter:gray;} </style>
Related Article

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.