css filter to achieve page gray black and white effect code_Experience exchange

WBOY
Release: 2016-05-16 12:05:56
Original
1839 people have browsed it

Taobao's code

Copy code The code is as follows:

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


CSS3 greyscale filter implementation

The following test code:
Copy code The code is 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); }

How to use: This code can change the web page to black and white. Add the code to the top of CSS to achieve plain decoration. It is recommended that webmasters across the country take action. Condolences for the compatriots who died in the earthquake.

If the website does not use CSS, you can insert it between the HTML code and of the web page/template:



Some webmasters’ websites may not be able to use this css because the website does not use the latest web standard protocol




Please replace the at the top of the webpage with the above code.

The colors of FLASH animations on some websites cannot be controlled by CSS filters. You can insert them between and in the FLASH code:




The simplest code to turn the page into gray is to add

General discuz forums are modified under your control css file /images/header/header.css this file
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!