自适应手机分辨率显示
$(window).bind(
'resize load'
,
function
(){
$(
"body"
).css(
"zoom"
, $(window).width() / 640);
$(
"body"
).css(
"display"
,
"block"
);
});
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,target-densitydpi=device-dpi">
比如设计图页面宽度640的,然后所有不同分辨率的手机,都按640px缩放。