关于screen.width和screen.height识别屏幕分辨率的问题?
phpcn_u226
phpcn_u226 2016-12-19 13:40:40
0
3
1204

关于screen.width和screen.height识别屏幕分辨率的问题

phpcn_u226
phpcn_u226

répondre à tous(3)
数据分析师

À propos de screen.width et screen.height pour identifier la résolution de l'écran ? - Questions et réponses sur le site Web chinois PHP - À propos de screen.width et screen.height pour identifier la résolution de l'écran ? - Questions et réponses sur le site Web chinois PHP

Jetez un œil et apprenez.

阿神

这是苹果自己的技术,虽然屏幕是2880*1800,但是对于浏览器而言是1440*900,只是mac用四倍分辨率进行渲染,以保证提高清晰度的同时,网页不会缩小。比如html中是14px的字体,在mac上其实是按照28px进行渲染的,但是对于html而言,你的浏览器其实是正常显示的14px的尺寸。这样熟,你能理解了吧

phpcn_u226

不好意思,问题没写清楚,我想问的是mac Retina的屏幕,这种方法不能正确的显示出正真的分辨率,都是打对折了 。有人知道怎么解决这个问题么?

我的电脑真是分辨率是2880*1800的,但是用这个方法识别出来的,是1440*900


Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!