News Ticker

Menu

Convert an image to grayscale in HTML/CSS

Convert an image to grayscale in HTML/CSS

Paste below code in to your css file, 

    
        img {
  filter: gray; /* IE6-9 */
  -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */
  filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */
}

/* Disable grayscale on hover */
img:hover {
  -webkit-filter: grayscale(0);
  filter: none;
}
    
  

Share This:

Jithesh P R

I'm Jithesh P R creative Graphic and web designer. I have a passion for designing creative Graphics and modern Websites, Specialized in creating W3C standard websites And WordPress based CMS Websites..

No Comment to " Convert an image to grayscale in HTML/CSS "

  • To add an Emoticons Show Icons
  • To add code Use [pre]code here[/pre]
  • To add an Image Use [img]IMAGE-URL-HERE[/img]
  • To add Youtube video just paste a video link like http://www.youtube.com/watch?v=0x_gnfpL3RM