文章目录

今天clone了趣分期移动端的网页,发现手机上显示的字体和PC端大概有1.2倍的视差,于是查看了相关的资料及做了测试。

首先有两个概念:DPI PPI这两个概念相信做移动端的朋友都有了解过。

PPI的不同,直接导致在不同屏幕上网页的缩放比例[前提是设置了width= device-width]。

code_test

摘录一段Mozilladeveloper的原话:

For web developers, this means that 320px be full width in portrait mode at scale=1, on all of the above-mentioned handheld devices, and they may size their layouts and images accordingly. But remember that not all mobile devices are the same width; you should also make sure that your pages work well in landscape mode, and on larger devices like the iPad and Android tablets.

 

糟糕,貌似截图不是很清晰。。。

大概的意思就是我做用iPhone4s做了个测试,ppi是114.82(用width 320px 算);电脑端是97.9,也是就说手机上看电脑上用px做的东西,将缩小114/97=1.18倍。

夜深了,睡了~毕竟程序员

文章目录