本文实例讲述了jquery实现根据浏览器窗口大小自动缩放图片的方法。分享给大家供大家参考。具体如下:
1?1:w/img.width;
var newWidth = img.width*percentage-30;
var newHeight = img.height*percentage;
image.width(newWidth).height(newHeight);
});
});
});
};
})(jQuery);
希望本文所述对大家的jquery程序设计有所帮助。