1:
设置网页的头部标签(viewport-fit=cover")
<meta name="viewport" content="width=device-width, viewport-fit=cover">
2:将页面主体设置在安全区域内(padding-bottom/bottom/margin-bottom)
.footer{
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}