Home >Backend Development >PHP Tutorial >javascript - Does this HTML5 page use plug-ins?
Why is this page forced to be viewed in landscape orientation once it is opened? http://www.cn3wm.com/3wmkj/youpiao/
The screen of the mobile phone is not very wide. As soon as I open it, it prompts that it must be viewed in landscape orientation
Why is this page forced to be viewed in landscape orientation once it is opened? http://www.cn3wm.com/3wmkj/youpiao/
The screen of the mobile phone is not very wide. As soon as I open it, it prompts that it must be viewed in landscape orientation
http://www.cn3wm.com/3wmkj/yo...
Bound a resize function#orientation
It is the mask of the prompt
<code>var resizeMyOwn = function() { console.log("resize now"); var a = cc.view.getFrameSize(); 1 > a.height / a.width ? (cc.log("resume from resize..."), cc.director.resume(), document.getElementById("Cocos2dGameContainer").style.display = "block", document.getElementById("orientation").style.display = "none") : (cc.log("pause from resize..."), document.getElementById("orientation").style = document.getElementById("Cocos2dGameContainer").style, document.getElementById("orientation").style.display = "block", document.getElementById("Cocos2dGameContainer").style.display = "none") };</code>
I can only say that js control must be useful
It can be controlled using meta tags, refer to common meta organization
Whether the screen is horizontal or not should be judged in the game.min.js. game.min.js
<code><meta name="MobileOptimized" content="320"> <!-- uc强制竖屏 --> <meta name="screen-orientation" content="portrait"> <!-- QQ强制竖屏 --> <meta name="x5-orientation" content="portrait"> <!-- UC强制全屏 --> <meta name="full-screen" content="yes"> <!-- QQ强制全屏 --> <meta name="x5-fullscreen" content="true"></code>