+ 4
Disable Landscape on my page
Is it possible to disable Landscape using JavaScript or CSS? When user visits my page on mobile device in portrait mode, and stop orientation changing when user rotate his phone to landscape. It is a game on the page, develop for portrait display only.
4 ответов
+ 5
Hmm, I see. I was wrong. Thanks for letting me know ChaoticDawg.
+ 4
This will answer your how to question.
https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Managing_screen_orientation
+ 4
Kevin ★ depending on the browser, it is possible to lock the orientation of the screen for your page. It is best however to plan your site across multiple or all widely used browsers. Apples Safari browser is one that you cannot lock the orientation of, and given its wide use it is best to plan for that.