目前HarmonyOS已支持env设置,类似env(safe-area-inset-bottom)。如下参考:<!-- index.html --> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width,viewport-fit=cover"> </head> <body> <div style="position: absolute; bottom: 0; margin-bottom: env(safe-area-inset-bottom)"></div> </body> </html>
目前HarmonyOS已支持env设置,类似env(safe-area-inset-bottom)。
如下参考: