星空网 > 软件开发 > Java

移动端横屏(beta)

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><script src='/images/loading.gif' data-original="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script><script>var orientation=0;function screenOrientationEvent(){if(orientation == 0){document.getElementById("change").value="竖";$("body").css({'transform':'rotate(90deg)','-webkit-transform':'rotate(90deg)','-moz-transform':'rotate(90deg)'});}else{document.getElementById("change").value="横";$("body").css({'transform':'rotate(0deg)','-webkit-transform':'rotate(0deg)','-moz-transform':'rotate(0deg)'});}}var innerWidthTmp = window.innerWidth;//横竖屏事件监听方法function screenOrientationListener(){try{var iw = window.innerWidth;//屏幕方向改变处理if(iw != innerWidthTmp){if(iw>window.innerHeight){orientation = 90;}else{orientation = 0;}//调用转屏事件screenOrientationEvent();innerWidthTmp = iw;}}catch(e){alert(e);};//间隔固定事件检查是否转屏,默认500毫秒setTimeout("screenOrientationListener()",500);}//启动横竖屏事件监听screenOrientationListener();</script><body onload="screenOrientationEvent()"><input id="change" type="text" value=""/></body></html>

  




原标题:移动端横屏(beta)

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

贸易海外仓:https://www.goluckyvip.com/tag/94596.html
俄罗斯海外仓一件代发:https://www.goluckyvip.com/tag/94597.html
俄罗斯海外仓iml:https://www.goluckyvip.com/tag/94598.html
街头小贩:https://www.goluckyvip.com/tag/946.html
海外仓建设内容:https://www.goluckyvip.com/tag/94600.html
海外仓俄罗斯:https://www.goluckyvip.com/tag/94602.html
跨境支付百科——巴西支付篇:https://www.kjdsnews.com/a/1836648.html
大福地快捷酒店预订 大福酒店怎么走:https://www.vstour.cn/a/365187.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流