编程语言
首页 > 编程语言> > 微信小程序安全区域

微信小程序安全区域

作者:互联网

// 配置底部安全区域
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

标签:constant,area,微信,safe,程序,bottom,padding,inset,区域
来源: https://www.cnblogs.com/wayhome123/p/15263568.html