手机端网页 横竖屏翻转事件

window.addEventListener('orientationchange', function(event){
    if( window.orientation == 90 || window.orientation == -90 ) {
        //横屏翻转处理事件
    }else{
	//竖屏处理事件
    }
});

  

posted @ 2016-09-30 09:33  智取小师妹  阅读(571)  评论(0编辑  收藏  举报