Jump to content

Possible to desaturate an image with CSS?


wanner

Recommended Posts

Sorry missed to mention that..... it works in IE only. Also as far as I know there's no alternative, as the filter is non-standard crap which IE has in a pathetic attempt make itself look good.
Hmpf, then ill guess ill have to live without it. Im not interested in IE only stuff.
Link to comment
Share on other sites

you can use opacity to achieve a similar (though not exact) effect. This will work cross-broswer:

<style>	img.grayme	{		opacity:.20;		filter: alpha(opacity=20);		-moz-opacity: 0.2;	}</style><img src="yourimage.jpg" class="grayme" onmouseover="this.className=''"; onmouseout="this.className='grayme'"/>

visit here for more tricks:http://www.mandarindesign.com/opacity.html

Link to comment
Share on other sites

you can use opacity to achieve a similar (though not exact) effect. This will work cross-broswer:
<style>	img.grayme	{		opacity:.20;		filter: alpha(opacity=20);		-moz-opacity: 0.2;	}</style><img src="yourimage.jpg" class="grayme" onmouseover="this.className=''"; onmouseout="this.className='grayme'"/>

visit here for more tricks:http://www.mandarindesign.com/opacity.html

Im using opacity atmBut thanks.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...