日期:2014-05-16 浏览次数:20424 次
function imgfix(){
?? var maxwidth=58;
??? ??? var maxheight=58;
??? ???? $("#test img").each(function(){
??? ??? ??? $(this).css("width",this.width>maxwidth && this.height/maxheight < this.width/maxwidth ? maxwidth:true);
??? ??? ??? $(this).css("height",this.height > maxheight && this.height/maxheight > this.width/maxwidth ? maxheight : true);
??? ??? });
}