CSS filter to achieve the page gray black and White effect code _ Experience Exchange

Source: Internet
Author: User
Taobao's Code

Copy Code code as follows:

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


CSS3 greyscale Filter Implementation

Test code as follows:
Copy Code code as follows:

. Gray {
-webkit-filter:grayscale (100%);
-moz-filter:grayscale (100%);
-ms-filter:grayscale (100%);
-o-filter:grayscale (100%);
Filter:grayscale (100%);
Filter:gray;
}


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

Usage: This code can change the page to black and white, add code to the top of the CSS can achieve goose. Suggested the national stationmaster to move up. Mourn for the people who died in the earthquake.

If your Web site does not use CSS, you can insert it between the HTML code
<style>
Html{filter:progid:dximagetransform.microsoft.basicimage (grayscale=1);}
</style>

There are some webmaster sites that may use this CSS not to take effect because the website does not use the latest Web standard protocol

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

Please replace the top
There are some Web site Flash animation colors can not be controlled by CSS filters, the Flash code <object ...> and </object> inserted between:

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

The simplest code to turn the page into Gray is to add <style type= "Text/css" between the head. >

HTML {
Filter:gray
}
</style>

The General Discuz Forum modifies/images/header/header.css this file under your control CSS file
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.