CSS safe area attributes doesn't work on iPhone X
问题 In my case I'm running a web app on iPhone X, I'm trying to add a padding on top to push my body to the safe area using the safe area css attributes of Webkit padding-top: constant(safe-area-inset-top); and padding-top: env(safe-area-inset-top); . However the web view doesn't evaluate correctly these attributes and it's always set to 0. What should I dod to make it work ! code : body { padding-top: 44px; padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); } 回答1: