javascript - How to disable horizontal screen of mobile phone in webapp developed with js
巴扎黑2017-07-05 10:49:37
0
4
831
Using js to develop a webapp, the leader requires that it can only be viewed when the mobile phone is in portrait mode and not in landscape mode. How to prohibit the mobile phone in landscape mode?
For WeChat, it seems that it can be achieved by calling their API, but other browsers are not able to do so at this stage. But you can make a prompt asking users to turn their phones horizontally, which is a better solution.
Lock screen orientation
For WeChat, it seems that it can be achieved by calling their API, but other browsers are not able to do so at this stage. But you can make a prompt asking users to turn their phones horizontally, which is a better solution.
It’s best to just write a p.tips
Then use media lookup
What is the so-called prohibition? What effect is to be achieved?