端适配兼容"/>
移动端适配兼容
<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 加上那俩个属性,且要加上背景色,不要回镂空,透明
更多推荐
移动端适配兼容
发布评论