javascript - 这个HTML5页面有用到插件吗
本文介绍了javascript - 这个HTML5页面有用到插件吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
为什么这个页面一打开强制横屏才能看http://www.cn3wm.com/3wmkj/youpiao/
手机屏幕都不是很宽,一打开就提示必须横屏才能看
解决方案
http://www.cn3wm.com/3wmkj/yo...
绑定了一个resize函数#orientation
就是提示的遮罩
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")
};
这篇关于javascript - 这个HTML5页面有用到插件吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文