css3 - CSS Viewport Height evaluated before minimal-ui applies on the very first load on mobile safari -


when using viewport height minimal-ui first time page load height evaluated address bar if set div height of 100vh acutal height of div viewport height minus height of address bar.

in example, on first load can see purple div after address bar hidden. if reload page or access page without deleting cache, red div occupy full height of viewport without taking in consideration address bar behavior i'm expecting on first load.

any ideas why?

<html xmlns="http://www.w3.org/1999/xhtml"> <head>     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui">     <title></title> </head> <body style="margin: 0; padding: 0;">      <div style="background-color: red; height: 100vh;">         hello     </div>     <div style="background-color: purple; height: 50px;">         world     </div>  </body> </html> 

thank you!


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -