This article mainly introduces the use of CSS to make the website black and white. It has a certain reference value. Now I share it with you. Friends in need can refer to it.
The following is the CSS code of the whole site.
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
How to use: This code can change the webpage to black and white. Add the code to the top of CSS to achieve plain decoration.
If the website does not use CSS, you can insert between the HTML code
<style> html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);} </style>
Some websites may not use this css because it does not take effect. 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"> <html xmlns="http://www.w3.org/1999/xhtml">
Please replace the at the top of the webpage with the above code.
The color of FLASH animations on some websites cannot be controlled by CSS filters. You can Insert 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"> html { FILTER: gray } </style>
above between the heads That’s the entire content of this article. I hope it will be helpful to everyone’s study. For more related content, please pay attention to the PHP Chinese website!
Related recommendations:
Simulate the effect of box-shadow in css3 under IE
Beautification of div imitation checkbox form style and functions
Beautiful buttons made using css styles
The above is the detailed content of Use CSS to make the website black and white. For more information, please follow other related articles on the PHP Chinese website!