1***@qq.com
1***@qq.com
  • 发布:2017-12-12 18:13
  • 更新:2018-12-10 18:51
  • 阅读:1354

离线打包-iphonex适配问题

分类:5+ SDK

我下载了IOS最新SDK(20171130版),将里面的HBuilder-Hello工程的HelloH5资源文件夹替换成自己的项目文件夹,用iphonex模拟器运行,发现iPhone X的Home Indicator那部分无法控制。。。

然后我继续用原来HelloH5的资源文件夹,写一个test.html(copy这篇文章 的demo),并将入口设置成test.html,在模拟器运行还是如下图一样的结果:body不包含Home Indicator那部分。。。不是说已经适配了iphonex吗?还是我姿势不对?或者需要设置什么?求大神解答!

附test.html

<!DOCTYPE html>
<html>
<head>
<!-- <meta name="viewport" content="initial-scale=1">-->
<meta name="viewport" content="initial-scale=1, viewport-fit=cover">
<title>Designing Websites for iPhone X: Respecting the safe areas</title>
<style>

  • {
    padding: 0;
    margin: 0;
    }
    html,body {
    width:100%;
    height: 100% !important;
    }
    body {
    background: grey;

        }  
        .top {  
            width: 100%;  
            height: 44px;  
            background: purple;  
        }  
        .bottom {  
            position: fixed;  
            bottom: 0;  
            left: 0;  
            right: 0;  
            height: 44px;  
            color: black;  
            background: green;  
        }  
        </style>  

    </head>
    <body>
    <div class="top">this is top</div>
    <div class="bottom">this is bottom</div>
    </body>
    </html>

2017-12-12 18:13 2 条评论 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

坐等官方更新 底部适配

5***@qq.com

5***@qq.com

我也是这个问题,顶部top无法控制,楼主找到解决办法了吗

DCloud_IOS_XTY

DCloud_IOS_XTY

请更新最新版本的SDK

该问题目前已经被锁定, 无法添加新回复