简体   繁体   中英

Viewport width does not change on mobile devices while switching between landscape/portrait view - why?

I noticed, that the viewport width does not change on mobile devices while switching between landscape/portrait view (on a PC monitor this is not the case). I have created some little test hmtl file here: http://dev.gmr-foto.at/mytest3.html It shows the viewport height and width using jQuery. Just open it on a mobile device (smartphone or tablet), and move between landscape and portrait view. I would have expected the height and width just swapping (in browser's fullscreen view of course). But the width stays the same, just the height changes. Does anyone know the reason for this behaviour?

Kind regards, Gerald

将元视口标签添加到头部<meta name="viewport" content="width=device-width, initial-scale=1.0">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM