window.devicePixelRatio在IE 10 Mobile中不起作用? [英] window.devicePixelRatio does not work in IE 10 Mobile?

查看:167
本文介绍了window.devicePixelRatio在IE 10 Mobile中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用window.devicePixelRatio,它可以在Andriod和Iphone上运行,但在IE 10 Windows Mobile中不起作用。任何替代方案?

I am using window.devicePixelRatio which works on Andriod and Iphone but does not work in IE 10 Windows mobile. any alternative?

推荐答案

window.devicePixelRatio = window.devicePixelRatio || 
Math.round(window.screen.availWidth / document.documentElement.clientWidth)

得到了来自 http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/08/internet-explorer-10-brings-html5-to-windows-phone- 8-in-a-big-way.aspx

这篇关于window.devicePixelRatio在IE 10 Mobile中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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