We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

jessnoonyes on 09/03/08


Tagged

image link opacity hover fade


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

SpinZ
basicmagic
l1r


Link/Image opacity until hover


Published in: CSS 


  1. The CSS
  2.  
  3.  
  4. a.linkopacity img {
  5. filter:alpha(opacity=50);
  6. -moz-opacity: 0.4;
  7. opacity: 0.5;
  8. -khtml-opacity: 0.4;}
  9. a.linkopacity:hover img {
  10. filter:alpha(opacity=100);
  11. -moz-opacity: 1.0;
  12. opacity: 1.0;
  13. -khtml-opacity: 1.0; }
  14.  
  15.  
  16. Add the class "linkopacity" to the <a>
  17.  
  18. <a href="#" class="linkopacity"><img src="images/photo.jpg"></a>

Report this snippet 

You need to login to post a comment.