Friday, October 3, 2014

Convert image color to black and white using CSS3

In this post I am going to show how to Convert image color to black and white using CSS3.grayscale filter is used to convert image color to black and white.



CSS Code

#img {
            -o-filter: grayscale(100%);
            -moz-filter: grayscale(100%);
            -webkit-filter: grayscale(100%);
            filter: grayscale(100%);
            }


To display images using HTML use the following code

HTML

<img src="yourimg.jpg" width="500" id="img"/>


Please share your comments and feedback.Thanks.Please subscribe my updates via email.

2 comments: