Posted by matt as CSS
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.
Tags: CSS sample script
2 Responses
j.j.
June 19th, 2009 at 3:17 pm
1-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
2Thanks for the info j.j.
I’ll check it out later.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Random Posts
.Net asp .net tutorial asp .net tutorial c# sample code CSS sample script database guide java sample code javascript sample code mssql sample script string reverse in C# t-sql telerik sample code user-defined function vb .net sample code visual studio tutorial
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.