加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Cocos2d-js h5游戏在 微信中打开时,点击屏幕后 微信上方title标

发布时间:2020-12-14 17:25:23 所属栏目:百科 来源:网络整理
导读:其原因是 可能是 canvas 元素的问题 将canvas加入到div元素中就可以解决。 html lang = "en" head meta charset = "utf-8" style body , canvas ,div { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -khtml-user-select: non
其原因是 可能是 canvas 元素的问题 将canvas加入到div元素中就可以解决。 
<html lang="en">
    <head>
    <meta charset="utf-8">


    <style>
    body,canvas,div {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0);
}

#Cocos2dGameContainer {
    position: absolute;
    margin: 0;
    overflow: hidden;
    left: 0px;
    top: 0px;
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
}
</style>

    

    <div id = "Cocos2dGameContainer" style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main" data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="640"  data-content-height="960" data-show-paint-rect="false" data-multi-fingered="2" data-show-fps="false" data-show-log="false"  data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">

        <canvas id="gameCanvas" width="640" height="960"></canvas>
    </div>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读