android - Why Chrome Developer Tools set such a big viewport size when emulating mobile? -


i have test document follows:

<html>   <head></head>   <body></body> </html> 

so it's empty document. in normal browser mode, nice empty page, no scrolls.

but when open devtools , turn on mobile emulation (for example, sony xperia z, z1), see scroll bars (both horizontal , vertical), , html element size 980x1742. come from? shouldn't @ least 0 height?

to make page exact size of screen (no zooming or otherwise), place in header:

<meta name="viewport" content="width=device-width, initial-scale=1"> 

there's more info it, additional parameters may find useful, on mozilla's developer site here.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -