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 "