Home >Backend Development >PHP Tutorial >javascript - Does this HTML5 page use plug-ins?

javascript - Does this HTML5 page use plug-ins?

WBOY
WBOYOriginal
2016-10-10 11:56:231358browse

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

Reply content:

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
#orientationIt 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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn