Instantly share code, notes, and snippets.

Embed
What would you like to do?
the notch adjustment in web code

Notch Adjustment

html

   <head>
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
   </head>
   

css

   @supports(padding: max(0px)){
   body{
     padding: env(safe-area-insert-top) env(safe-area-insert-right) env(safe-area-insert-left) env(safe-insert-bottom);
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment