鼠标移入移出改变图片大小

//鼠标移入移出,改变图片大小
$(document).ready(function(){
    $('#large').mouseenter(function(){    
         var wValue=1.5 * $(this).width();    
         var hValue=1.5 * $(this).height();          
         $(this).stop().animate({width: wValue,    
                         height: hValue,    
                         left:("-"+(0.5 * $(this).width())/2),    
                         top:("-"+(0.5 * $(this).height())/2)}, 1000);    
     }).mouseleave(function(){    
         $(this).stop().animate({width: "100",    
                                      height: "80",    
                                      left:"0px",    
                                      top:"0px"}, 1000 );    
     });
 });

 

posted @ 2017-10-30 16:29  javadongx  阅读(725)  评论(0)    收藏  举报

javadong@qq.com