怎样用jquery实现当鼠标放到图片上面时,图片等比例的缩小,要有动画效果

怎样用jquery实现当鼠标放到图片上面时,图片等比例的缩小,要有动画效果
彼岸灿烂这个我试了,不能用啊;

-----------------------------------------------------------------------------------------------
还是不行呢,怎么回事啊?:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("img").hover(function(){
$("this").animate({
width: "90%",
height: "90%"
}, 1000 );
});
});
</script>
---------------------------
<div>
<img src="25.png" width="310" height="150" /></div>

第1个回答  2012-07-31
$("img").hover(function(){
$("this").animate({
width: "90%",
height: "90%",
}, 1000 );
});
是这种效果吗追问

这样上下左右是同时往中间缩小吗?是的话就行了

追答

$(document).ready(function(){
$("img").hover(function(){
$(this).animate({
width: "90%",
height: "90%"
}, 1000 );
});
})
那个this多了引号 你没看出来么?我之间键盘敲的没注意,在编辑器里一下就看出来了 我测试了 你看看吧

追问

恩可以了,只是我想要的是四面往中间缩,这个是往左上角一个点缩的,若能告诉我怎么让它往中心缩小就行了,那样的话自当感激不尽,加分以表示感谢!

本回答被提问者采纳
第2个回答  2012-08-02
$('img').hover(function() { $(this).animate({ width: "90%", height: "90%" }, 1000); });

再试,彼岸灿烂多写了个逗号

怎么不谢我啊!~~~~唉追问

多谢多谢,只是分只能给一个人啊