Make a Web site black and white with CSS

Source: Internet
Author: User
This time to bring you to use CSS to make the website black and white, CSS will make the site black and white attention to what, the following is the actual case, together to see.

Here's how:

This CSS code can change the page to black and white, add the code to the top of the CSS to achieve goose.

Html{filter:grayscale (100%);-webkit-filter:grayscale (100%);-moz-filter:grayscale (100%);-ms-filter:grayscale ( 100%);-o-filter:grayscale (100%); Filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1);}

If you do not have HTML tags on the page, remember to add, you can add the following HTML5 tag, or replace the above CSS tag HTML is body or other.

<! DOCTYPE html>

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"/>

If some of the pages with flash still display color, or the browser up and down the scrollbar when the Flash FLV player to change flowers (for example, sword Net 3, Swordsman World website splitter page), Flash to JS output (this example is SWFObject):

<script type= "Text/javascript" src= "/js/swf.js" ></script><p id= "Video_content" ></p>< Script type= "Text/javascript" ><!--var video_player_so = new SWFObject ("video-542.swf", "Sotester", "439", "246", "7"); Video_player_so.addparam ("wmode", "opaque"); Video_player_so.addparam ("allowFullScreen", "true"); Video_ Player_so.addparam ("allowScriptAccess", "Always"), Video_player_so.write ("video_content");//--></script >

Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!

Recommended reading:

CSS selector use of the detailed

CSS3 Filter Properties in detail

Specific tips for using CSS margin

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.