CSS Image Highlighting

A script that makes any image(s) appear dull before the mouse moves over it. When you hover over an image it changes to its original appearance.

About This Script

To use this, simply copy the CSS from below to the <head> tag of your page. Then add the "highlight" class to any image you want this to apply to.

Demo

Hover over an image to see the effect.

Code

<style type="text/css"> /** * Highlighting image effect provided by http://www.top-site-list.com */ img.highlight { filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ filter: gray; /* IE6-9 */ -webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ opacity:.7; -webkit-transition: all 0.3s ease-out; transition: all 0.3s ease-out; } img.highlight:hover { filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0'/></filter></svg>#grayscale"); -webkit-filter: grayscale(0%); opacity:1; } </style> <!-- Examples. You don't need to copy this part. --> <img class="highlight" src="http://www.top-site-list.com/scripts/assets/grayscale-images/dog.jpg" /> <img class="highlight" src="http://www.top-site-list.com/scripts/assets/grayscale-images/pizza3.jpg" /> <img class="highlight" src="http://www.top-site-list.com/scripts/assets/grayscale-images/sf.jpg" /> <img class="highlight" src="http://www.top-site-list.com/scripts/assets/grayscale-images/horse.jpg" />
More scripts

Do you want to expose your site to millions?
Do you want to be ranked higher in Google?
Do you want to be known as the best site in your niche?

Then look no further. Add your site in 3 simple steps. Sign up, Add your site and Start receiving votes! It only takes 10 seconds!

Sign Up to Top Site List Planet Now!

Login with one of these social networks...

Sign in with FacebookSign in with TwitterSign in with Google+Sign in with Yahoo!Sign in with LinkedIn

or create an account with your email...

Login To An Existing Account