对应移动终端自适应的用css3的scale来解决,老师看是否合适
var screenWidth = $(window).width();
if( screenWidth < 500){
var paddingWidth = 15;
var scale = (screenWidth - paddingWidth*2) / 500;
var trans = paddingWidth/scale;
$('#gridContainer').css({
'transform-origin': '0 0',
'transform': 'scale('+scale+') translate('+trans+'px, '+trans+'px)',
'-webkit-transform': 'scale('+scale+') translate('+trans+'px, '+trans+'px)',
})
}