JS:orientationchange过吗? [英] JS: orientationchange before?

查看:403
本文介绍了JS:orientationchange过吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

旋转后的orientationchange火灾已经完成。我怎么能在OS启动综合窗口旋转之前触发一个事件?

the orientationchange fires after the rotation has been completed. how can i fire a event before the os starts the integrated window rotation ?

编辑:例如。淡出轮换开始前元素

edit: eg. to fade out elements before rotation starts

推荐答案

您可以检测设备precise旋转,所以当你看到它旋转到precise点,屏幕旋转时之前,可以触发它

you can detect the devices precise rotation so when you see it rotates to a precise point, before the screen rotates, you can trigger it.

这可能有一定的误报强硬。
http://dev.w3.org/geo/api/spec-source -orientation.html

This may have some false positives tough. http://dev.w3.org/geo/api/spec-source-orientation.html

这篇关于JS:orientationchange过吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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