Sunday, March 3, 2013

How to Convert Images into Black and White Using CSS

at 7:39 PM
2 Comments

Today tutorial i will tell you how to change the color images into black and white using simple script. This code has the ability to make images into black and white using CSS. Turn images into black and white without having to use Photoshop and other image editing softwar .
It is always nice to turn your colorful images into black and white in your web design work. Adding such a grey-scale effect on images is useful for gallery and hover effects designs.

Check out the demo below:

Convert Images into Black and White

Click Here for More Live Demo:

How can Add Css Code into your blog.


  1. Go To Blogger > Design > Edit HTML
  2. Search (Ctrl+F) for  ]]></b:skin>

Past below code above ]]></b:skin>

#bk-grayscale{
background:url("1.jpg")no-repeat;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
}
And put the below code where you want to show images.

<img id="bk-grayscale" src="IMG URL" />
 Change IMG URL with your image URL

And if you can add only one image on post or widgets then only put below html code


<style>
#bk-grayscale{
background:url("1.jpg")no-repeat;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
}
</style>
<img id="bk-grayscale" src="IMG URL" />
Change IMG URL with your image URL

Hope I was able to explain everything to the point. You can use other options along with grayscale filter on the images like hover effects and gallery stuffs without the need to use Photoshop or any other image editing software.
Get Free Updates:

2 comments:

  1. Thank you sir very nice tips.

    ReplyDelete
  2. Thank you very much sir. The css tips helped me a lot. :)

    ReplyDelete

Your feedback is always appreciated. we'll try to reply to your queries as shortly as time allows.

Note:
1. To add HTML CODE in comments then please use our HTML Encoder
2. You can always Test the tutorial on our HTML Editor
3. Please don't spam Spam comments will be deleted immediately upon our review.

Regards,
Mohammad Azeem