移动端适配兼容--ios系统iphoneX等机型底部小横条处理,app嵌入的适配处理

移动端适配兼容--ios系统iphoneX等机型底部小横条处理,app嵌入的适配处理,第1张

<meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
    <!-- 开启顶部安全区适配 -->
    <van-nav-bar safe-area-inset-top />
    <!-- 开启底部安全区适配 -->
    <van-number-keyboard safe-area-inset-bottom />

然后在样式公共配置页:添加constant(),env() ,一定要按顺序来

html,
body,
#app {
  font-family: PingFang SC, Avenir, Helvetica, Arial, sans-serif;
  width: 100%;
  min-height: 100%;
  font-size: 26px;
  background: #f4f4f4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

还要在fixed 的 footer 加上那俩个属性,且要加上背景色,不要回镂空,透明

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/993323.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存