关于 iphone刘海屏适配

默认刘海屏的webview是有安全区域的,加上viewport-fit=cover属性后webview会全屏,全屏后为了适配刘海屏加上安全区域

padding-top: 1rem;//android样式 padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);// ios 样式 padding: constant(safe-area-inset-top) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left); // ios样式

ios两个样式原因
when the iPhone X first came out, it used constant() instead of env(), but as of 11.2, constant() has been removed in favor of the standardized env()
上一篇:适配iponeX


下一篇:电位器替换遥控器做远程遥控方案,远程控制云台方案