orientationchange 事件是在用户水平或者垂直翻转设备(即方向发生变化)时触发的事件。
注意:如果要查看 orientationchange 事件的效果, 用户必须使用移动设备或者移动模拟器来查看本站实例。
$(window).on("orientationchange",function(event){...})
function(event)
必须。指定 orientationchange 事件触发后执行的函数。要确定设备按哪个方向旋转,您可以访问方向属性 orientation ,属性值可以是 "portrait(纵向)" 或者 "landscape(横向)"。