好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

基于html5DeviceOrientation实现微信摇一摇功能_html5教程技巧

在HTML5中,DeviceOrientation特性所提供的DeviceMotion事件封装了设备的运动传感器时间,通过改时间可以获取设备的运动状态、加速度等数据(另还有deviceOrientation事件提供了设备角度、朝向等信息)。

而通过DeviceMotion对设备运动状态的判断,则可以帮助我们在网页上就实现[摇一摇]的交互效果。

运动事件监听


查看更多关于基于html5DeviceOrientation实现微信摇一摇功能_html5教程技巧的详细内容...

  阅读:45次