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
Post a Comment