Home  >  Article  >  Web Front-end  >  Use CSS to make the website black and white

Use CSS to make the website black and white

不言
不言Original
2018-06-21 17:54:422885browse

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 93f0f5c25f18dab9d176bd4f6de5d30e and 9c3bca370b5104690d9ef395f2c5f8d1 of the web page/template:

<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 100db36a723c770d327fc0aef2ce13b1 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 69072d9f468271be1a9d8c4449214c5f and eb50c9ec568c9b96871b9e94a1ff3fd1 in FLASH code:

<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!

Statement:
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