One, vertical screen to horizontal screen problem
<!--UC Force vertical screen--
<meta name= "Screen-orientation" content= "Portrait" >
<!--QQ Forced vertical screen--
<meta name= "X5-orientation" content= "Portrait" >
<!--UC Mandatory fullscreen--
<meta name= "Full-screen" content= "yes" >
<!--QQ Mandatory fullscreen--
<meta name= "X5-fullscreen" content= "true" >
<!--UC Application Mode--
<meta name= "Browsermode" content= "Application" >
<!--QQ Application Mode--
<meta name= "X5-page-mode" content= "App" >
<!--windows Phone Click No Highlight--
<meta name= "Msapplication-tap-highlight" content= "no" >
<!--adapt to mobile end---
Second, monitoring screen rotation
4. Screen Rotation event: Onorientationchange
Add a screen rotation event to listen to the screen rotation status (left, right, or not) at any time. Example:
Determine if the screen is rotated
function Orientationchange () {
Switch (window.orientation) {
Case 0:
Alert ("Portrait mode 0,screen-width:" + Screen.width + "; Screen-height: "+ screen.height);
Break
CASE-90:
Alert ("left-handed -90,screen-width:" + Screen.width + "; Screen-height: "+ screen.height);
Break
Case 90:
Alert ("Right-handed 90,screen-width:" + Screen.width + "; Screen-height: "+ screen.height);
Break
Case 180:
Alert ("Landscape mode 180,screen-width:" + Screen.width + "; Screen-height: "+ screen.height);
Break
};<br>};
Add Event Listener
AddEventListener (' Load ', function () {
Orientationchange ();
Window.onorientationchange = Orientationchange;
});
Summary of screen rotation problems