Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/10/2011, 22:21
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Efecto en Roll Over

Podés hacerlo con jQuery

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.     <head>
  5. <title>Roll Over con Fade Jquery</title>
  6. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
  7. <style type="text/css">
  8. img { border:0px; }
  9. ul.img_list {
  10.     display:inline;
  11.     float:left;
  12.     height:280px;
  13.     list-style-image:none;
  14.     list-style-position:outside;
  15.     list-style-type:none;
  16. }  
  17.    
  18. li.image_on a {
  19.     display:block;
  20.     width:280px;
  21.     height:280px;
  22.     position:relative;
  23. }  
  24.  
  25. li.image_on a .rollover {
  26.     display:block;
  27.     position:absolute;
  28.     top:0;
  29.     left:0;
  30.     width:280px;
  31.     height:280px;
  32.     background:url(img_on.png);
  33. }
  34.  
  35. <script type="text/javascript">        
  36. $(document).ready(function(){
  37.  
  38.     $(".rollover").css({'opacity':'0'});
  39.     $('.img_list a').hover(
  40.         function() {
  41.             $(this).find('.rollover').stop().fadeTo(500, 1);
  42.         },
  43.         function() {
  44.             $(this).find('.rollover').stop().fadeTo(500, 0);
  45.         }
  46.     )
  47.  
  48. });    
  49. </head>
  50. <ul class="img_list">
  51. <li class="image_on"><a href="#"><span class="rollover"></span><img src="img_off.jpg" alt="" width="280" height="280" /></a></li>
  52. </ul>
  53. </body>
  54. </html>

saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.