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?
我想大声告诉你2017-07-05 10:51:37
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.
黄舟2017-07-05 10:51:37
It’s best to just write a p.tips
Then use media lookup
@media screen and (orientation:landscape) {
.tips{
display:block;
}
/* 内容就隐藏 */
.container{
display:none
}
}