这是一个比较笨用jq放大图片的方法,但用一下也还是可以的
$(".floor_1_body img").mouseover(function() {
$(this).stop().animate({
width: "110%",
height: '110%',
marginTop: "-10%",
marginLeft: "-5%",
})
});
$(".floor_1_body img").mouseout(function() {
$(this).stop().animate({
width: "100%",
height: '100%',
marginTop: "0",
marginLeft: "0"
})
});
直接按照百分比放大宽高,同时按照百分比来把图片往左上角移动,这样看上去就像是在正中心放大的了,不过需要自己计算一下大概的值




叨叨几句... NOTHING