微信小程序安全区域

// 配置底部安全区域
page {
  //iOS 11
  padding-right: constant(safe-area-inset-right);
  padding-bottom: constant(safe-area-inset-bottom);
  padding-left: constant(safe-area-inset-left);
 
  //iOS 11.2+
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
height: calc(96rpx+ constant(safe-area-inset-bottom));//兼容 IOS<11.2
 
height: calc(96rpx + env(safe-area-inset-bottom));//兼容 IOS>11.2
 
padding-bottom: constant(safe-area-inset-bottom);//兼容 IOS<11.2
 
padding-bottom: env(safe-area-inset-bottom);//兼容 IOS>11.2
 
 
// 先constant再env


https://blog.csdn.net/qq_21363577/article/details/109734506

上一篇:Iterator的fail-fast、fail-safe机制


下一篇:02 动画效果与safe args传参