Here is an illustration on how to use CSS to modify the opacity of ‘image-links’ and create a nice effect
CSS:
img{
border:none;
}updated version
.link img{
-ms-filter: “alpha(opacity=50)”; /*IE 8*/
filter: alpha(opacity=50); /*lower IE versions*/
opacity: 0.5; /*FF*/
}.link:hover img{
-ms-filter: “alpha(opacity=100)”; /*IE 8*/
filter: alpha(opacity=100); /*lower IE versions*/
opacity: 1; /*FF*/
}deprecated
.link img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
-moz-opacity: 0.5;
}.link:hover img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-opacity: 1;
}
How to use:
<a href=”#” class=”link” ><img src=”superman.jpg”/></a>
Thanks for the input j.j.
4 Responses
Boipara
May 24th, 2009 at 12:47 pm
1Hi, nice posts there
thank’s for the interesting dirt
Lokfespodopex
June 5th, 2009 at 7:14 am
2Hi, Congratulations to the site owner for this marvelous work you’ve done. It has lots of useful and interesting data.
j.j.
June 19th, 2009 at 3:17 pm
3-moz-opacity IS DEAD. plain opacity works in Firefox and other Browsers.
IE8 needs filter values in quotes. See
https://developer.mozilla.org/en/CSS/opacity#Browser_compatibility
matt
June 22nd, 2009 at 6:36 am
4Thanks for the info j.j.
I’ll check it out later.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
Meta
Calendar
codehutch.com is proudly powered by WordPress - BloggingPro theme by: Design Disease