像素到MM方程式? [英] Pixel to MM equation?

查看:179
本文介绍了像素到MM方程式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在一个可靠的公式来计算MM的像素大小?还是不可能跨设备使用?

Is there a reliable equation to work out pixel size to MM? Or is that not possible cross device?

我们正在与一个定制系统一起使用,该系统可以将内容传送到许多具有不同屏幕尺寸的设备,它可以检测MM的屏幕宽度,但是我们希望将其准确地转换为像素大小,以便使用简单的方法动态地提供正确尺寸的图像jQuery脚本!?

We are working with a bespoke system that delivers content to many devices with different screen sizes, it can detect the screen width in MM, but we would like to accurately convert this to pixel size to deliver correctly sized images dynamically using a simple jquery script!?

有什么想法吗?

欢呼 保罗

推荐答案

我做了什么:

 <div id="my_mm" style="height:100mm;display:none"></div>

然后:

var pxTomm = function(px){   
   return Math.floor(px/($('#my_mm').height()/100)); //JQuery returns sizes in PX
 };

这篇关于像素到MM方程式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆