function px2pm(d) {
var iswindow = /windows|win32/i.test(navigator.userAgent);
if (iswindow) {
return Math.round(d * 25.4 / 96);//电脑端
} else {
return Math.round(d * 25.4 / 72);//手机端
}
}
function pm2px(d) {
var iswindow = /windows|win32/i.test(navigator.userAgent);
if (iswindow) {
return Math.round(d * 96 / 25.4);
} else {
return Math.round(d * 72 / 25.4);
}
}