在Internet Explorer10Metro风格中,我想捕捉当用户使用收缩手势缩小到全景时发生的事件。
我可以使用在页面中运行的JavaScript或在IE地址空间中运行的C++代码来完成此操作。
发布于 2012-02-27 18:18:42
这是一个技巧,但它是有效的,额外的最小缩放大约是正常大小的0.85,所以我们检查用户是否缩小了超过0.87:
window.addEventListener ('resize', function () {
if (document.documentElement.clientHeight / window.innerHeight <= 0.87){
// this will run more than once while the user
// is zooming out close to the maximum level
}
}, false);当缩放被禁用(移动网站)时,它将不起作用。
https://stackoverflow.com/questions/9393001
复制相似问题