javascript - Does this HTML5 page use plug-ins?
Oct 10, 2016 am 11:56 AM
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#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>

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian
