How to detect page zoom level in IE 8?

走远了吗. 提交于 2019-12-23 09:39:29

问题


Sadly I didn't a good enough solution on this generic question.

The most upvoted & accepted answer does't seem to work for me on IE 8.0.7601.17514 (latest). Another answer came close to working - but it is always off for me by 20%, probably because I have large fonts defined in Windows. I'm imagine I can't detect this in javascript, so this is not a solid answer as well (even though it might actually work for 95% of IE users ... I might use it as a workaround).

Is there a better, solid way to detect what the current page zoom is in IE 8?


回答1:


I believe you can access it via the screen object:

screen.deviceXDPI / screen.logicalXDPI 

and zoom relative to default:

screen.systemXDPI / screen.logicalXDPI

untested :)



来源:https://stackoverflow.com/questions/7702759/how-to-detect-page-zoom-level-in-ie-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!