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.

0 comments:

Post a Comment

 
Top