- 注册时间
- 2017-7-27
- 最后登录
- 2020-12-5
- 阅读权限
- 20
- 积分
- 52
- 精华
- 0
- 帖子
- 11

|
发表于 2020-10-19 19:17:39
|显示全部楼层
最后附上两个html全部代码
父页
<!doctype html>
<html>
<head>
<title>嵌入式隐藏地址栏</title>
<meta name="applicable-device" content="mobile">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=no" name="viewport" />
<!-- 游戏全屏 -->
<meta content="true" name="full-screen" />
<meta content="true" name="x5-fullscreen" />
<meta content="true" name="360-fullscreen" />
</head>
<body style="margin: 0;background-color: green">
<!-- 游戏嵌入iframe //华为荣耀honor 6x 在 meta x5- 360- full-screen 模式下,出现底部原有菜单大小的“剪切”区域透明,即:底部出现镂空区域,上下滑时就会出现 -->
<div style="height:100%;position:absolute;top:0;width:100%;overflow-y : hidden;">
<iframe id="frame" src="./sc2.html?uid=<?=$_GET['uid'];?>&sid=<?=$_GET['sid'];?>&sign=<?=$_GET['sign'];?>&version=<?=time();?>" scrolling="no" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" ></iframe>
</div>
</body>
</html>
子页面sc2.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html style="width: 100%;height: 100%;touch-action: none">
<head>
<meta charset="utf-8">
<title>丛林猎人</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1">
<!--https://developer.apple.com/libr ... les/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="true">
<meta name="x5-fullscreen" content="true">
<meta name="360-fullscreen" content="true">
<!-- force screen orientation on some browser -->
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- <link rel="stylesheet" type="text/css" href="style-mobile.css?_v=233" /> -->
<style>
html,
body {
-ms-touch-action: none;
padding: 0;
border: 0;
margin: 0;
height: 100%;
}
canvas {
background-color: rgba(0, 0, 0, 0);
outline: none;
}
#splash {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* background: rgba(0, 0, 0, 0) url(./assets/resources/splash.img.jpg?_v=233) no-repeat center; */
background-size: 100%;
}
</style>
</head>
<body style="width: 100%;height: 100%; background-color:#e13dff;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;">
<canvas id="canvas" style="width:1000%;height:1000%;position: absolute;left: 0px;top: 0px;background: #6e0d09 none repeat scroll 0% 0%;"></canvas>
<script>
var c = document.getElementById("canvas");
c.addEventListener("touchstart",function (event) {
event.stopPropagation();
event.preventDefault();
});
c.addEventListener("touchmove",function (event) {
event.stopPropagation();
event.preventDefault();
});
c.addEventListener("touchend",function (event) {
event.stopPropagation();
event.preventDefault();});
c.addEventListener("focusout",function (event) {
event.stopPropagation();
event.preventDefault();});
</script>
</body>
</html> |
|