jq实现鼠标移动到 图片上放大,移开图片缩小效果(打算封装成插件)

先看代码

<script> 
$(function() {
    $('div').mouseover(function() {
        $('img').animate({
            opacity: '0.9',
            width: '120%',
            height: '120%',
            left:"-10%"
        });
    });
    
        $('div').mouseout(function() {
        $('img').animate({
            opacity: '1.0',
            width: '100%',
            height: '100%',
            left:"0%"
        });
    });
})
</script>

不知道,大神们还有更加好的方法方式么?

posted @ 2015-08-26 13:36  SmallW  阅读(2116)  评论(0编辑  收藏  举报