uni-app开发app,底部fixed按钮等,经常会遮盖在功能按钮上,下面是有效的解决方案:
1、在manifest.json配置:
"app-plus" : {
"safearea" : {
//安全区域配置,仅iOS平台生效
"bottom" : {
// 底部安全区域配置
"offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
}
}
},2、在按钮被安全区按钮遮挡的地方加上padding-bottom:
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
