JQuery图片大小自适应

$("img").each(function(){
        if($(this).width() > $(this).parent().width()) {
                $(this).width("100%");
        }
});
原文地址:https://www.cnblogs.com/binny1983/p/1454604.html